Files
bun-src/test/bundler/transpiler/react-compiler-fixtures/error.assign-global-in-jsx-children.js
2026-08-27 21:09:14 +00:00

10 lines
245 B
JavaScript

function Component() {
const foo = () => {
someGlobal = true;
};
// Children are generally access/called during render, so
// modifying a global in a children function is almost
// certainly a mistake.
return <Foo>{foo}</Foo>;
}