dillon1000/react
Commit
Browse files Memoize hook args (treat as escaping)
Updates `PruneNonEscapingScopes` to consider hook arguments as potentially escaping. This is because hook inputs are "owned" by React — for example, closures passed to `useEffect`, or a value that is passed to a custom hook and which then becomes a memoized input.
Changed paths4 files
First-parent comparisoncompiler/forget/src/HIR/Globals.ts ModifiedM compiler/forget/src/ReactiveScopes/PruneNonEscapingScopes.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/useEffect-arg-memoized.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/useEffect-arg-memoized.js AddedPatch
Files changed
Rendering syntax-highlighted changes…