dillon1000/react
Commit
Browse files Propagate reactivity to other operands accounting for mutable ranges
Previously if any operand was reactive, we transferred that reactivity to other operands that had a mutable effect (capture, conditionally mutate, mutate, or store). But a value can be captured without ever being modified again. This PR updates the logic to only transfer reactivity among operands that are actually mutable at the given instruction, based on the mutable range. This is strictly more precise.
Changed paths7 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/Inference/InferReactivePlaces.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/InferReactiveScopeVariables.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/phi-type-inference-property-store.expect.md ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-dependency-nonreactive-captured-with-reactive.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-dependency-nonreactive-captured-with-reactive.js AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-dependency-object-captured-with-reactive-mutated.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/reactive-dependency-object-captured-with-reactive-mutated.js AddedPatch
Files changed
Rendering syntax-highlighted changes…