mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
We try to merge consecutive reactive scopes that will always invalidate together, but there's one common case that isn't handled. ```js const y = [[x]]; ``` Here we'll create two consecutive scopes for the inner and outer array expressions. Because the input to the second scope is a temporary, they'll merge into one scope. But if we name the inner array, the merging stops: ```js const array = [x]; const y = [array]; ``` This is because the merging logic checks if all the dependencies of the second scope are outputs of the first scope, but doesn't account for renaming due to LoadLocal/StoreLocal. The fix is to track these temporaries. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34049). * __->__ #34049 * #34047 * #34044 |
||
|---|---|---|
| .. | ||
| babel-plugin-react-compiler | ||
| eslint-plugin-react-compiler | ||
| make-read-only-util | ||
| react-compiler-healthcheck | ||
| react-compiler-runtime | ||
| react-forgive | ||
| react-mcp-server | ||
| snap | ||