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