Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/error.invalid-mutation-of-possible-props-phi-indirect.js
2026-08-27 21:09:14 +00:00

11 lines
258 B
JavaScript

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