Files

10 lines
245 B
JavaScript
Raw Permalink Normal View History

2026-08-27 21:09:14 +00:00
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>;
}