JSTQL-JS-Transform/output_testing/1049error.invalid-mutation-of-possible-props-phi-indirect.js

10 lines
No EOL
264 B
JavaScript

function Component(props) {
let x = cond ? someGlobal : props.foo;
const mutatePhiThatCouldBeProps = () => {
x.y = true;
};
const indirectMutateProps = () => {
mutatePhiThatCouldBeProps();
};
(() => indirectMutateProps()) |> useEffect(%, []);
}