dillon1000/react
Commit
Browse files Add back transitive freeze functions option
Adds back a mode to transitively freeze function expressions, independently from the mode to preserve existing manual memoization. This lets us experiment with a few variants: * Preserve existing memoization * Validate existing memoization with: * `enableAssumeHooksFollowRulesOfReact` && `enableTransitivelyFreezeFunctionExpressions` * `enableAssumeHooksFollowRulesOfReact` only * neither of those flags Note that `enableTransitivelyFreezeFunctionExpressions` alone probably doesn't make sense, it's more aggressive than `enableAssumeHooksFollowRulesOfReact` so we might as well try them together.
Changed paths4 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/HIR/Environment.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/Inference/InferReferenceEffects.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/transitive-freeze-function-expressions.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/transitive-freeze-function-expressions.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…