dillon1000/react

Commit

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.
Browse files
Changed paths4 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…