mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Summary: Change detection is desgined to determine whether rules of react have been violated, and to do so better we need to loosen Forgets assumptions about what kinds of values don't need to be memoized. For example, the compiler typically doesn't think of `o.x` as something that needs to be memoized, because it does not allocate. However, we want to compare `o.x` in the current render with `o.x` in a previous one, so we now insert a "memoization" (comparison, really) block around this value.
ghstack-source-id: 413d866dde
Pull Request resolved: https://github.com/facebook/react/pull/30180