compiler: Add support for ref effects
Fixes false positives where we currently disallow mutations of refs from callbacks passed to JSX, if the ref is also passed to jsx. We consider these to be mutations of "frozen" values, but refs are explicitly allowed to have interior mutability. The fix is to always allow (at leat within InferReferenceEffects) for refs to be mutated. This means we completely rely on ValidateNoRefAccessInRender to validate ref access and stop reporting false positives. ghstack-source-id: 1a30609f5f7831086077d10dac46ab70687f47e0 Pull Request resolved: https://github.com/facebook/react/pull/29733
J
Joe Savona committed
827cbea417a4058ce544184adff2ee2014625309
Parent: c4b433f