Conversation
Adds some new test cases for ValidateNoDerivedComputationsInEffects.
…ps derived effects This PR adds infra to disambiguate between two types of derived state in effects: 1. State derived from props 2. State derived from other state TODO: - [ ] Props tracking through destructuring and property access does not seem to be propagated correctly inside of Functions' instructions (or i might be misunderstanding how we track aliasing effects) - [ ] compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/useEffect/invalid-derived-state-from-props-computed.js should be failing - [ ] Handle "mixed" case where deps flow from at least one prop AND state. Should probably have a different error reason, to aid with categorization
…ct is used elsewhere
…o derived computations in effects
Greptile OverviewGreptile SummaryThis PR enhances the React Compiler's validation to detect
Confidence Score: 4/5
Important Files ChangedFile Analysis
|
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
Mirror of facebook/react#34392
Original author: jorge-cab
Stack created with Sapling. Best reviewed with ReviewStack.