You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…moize/FinishMemoize
By default, React Compiler will skip compilation if it cannot preserve existing memoization. Ie, if the code has an existing `useMemo()` or `useCallback()` and the compiler cannot determine that it is safe to keep that memoization — or do even better — then we'll leave the code alone. The actual compilation doesn't use any hints from existing memo calls, this is purely to check and avoid regressing any specific memoization that developers may have already applied.
However, we were accidentally reporting some false-positive _validation_ errors due to the StartMemoize and FinishMemoize instructions that we emit to track where the memoization was in the source code. This is now fixed.
Fixes#29131Fixes#29132
[ghstack-poisoned]
…moize/FinishMemoize
By default, React Compiler will skip compilation if it cannot preserve existing memoization. Ie, if the code has an existing `useMemo()` or `useCallback()` and the compiler cannot determine that it is safe to keep that memoization — or do even better — then we'll leave the code alone. The actual compilation doesn't use any hints from existing memo calls, this is purely to check and avoid regressing any specific memoization that developers may have already applied.
However, we were accidentally reporting some false-positive _validation_ errors due to the StartMemoize and FinishMemoize instructions that we emit to track where the memoization was in the source code. This is now fixed.
Fixes#29131Fixes#29132
ghstack-source-id: 9f6b8dbc5074ccc96e6073cf11c4920b5375faf6
Pull Request resolved: #29154
Summary
im not sure what is the specific case here. i know that i dont get an error if i do any of the following:
execute
func in the hookhttps://playground.react.dev/#N4Igzg9grgTgxgUxALhAHQHYDMobgFwEsIMACDCCAB1IAoBKU4TU0mBfWMjKAG18wBfTJhx4iJUlDAIAKgjD4GTFqTglFpAB6kAvFJkAlBFloVq9EWTUb8pBFoRwo+BHroBDAEYQY+AMIk+DAQ-AgwAPzIpACCPn6BGMGhvOGMugB8KtasrFoAdM4w7EkMqrk2GJrevvgAMoSKCBjh7sqZ2RUVNQlBIWGR+WCEAOYYHrz57AC2EABuCACiC0kNTS0wtADkPfhbADSku2uuG5Y5XQVFJXb65lTlucIXz6rSS1hYTkrtWcwX7E4MDIv20hVgNzK1kEhwA2gBdc6qQFcJj2RzOVykZ6vFpaKi1UgAExMHj4djEBGIZAAsgBPGJUKjKf6sFHA0gAHiJhDmGQAEgh+BBSAB1Xy8ImcgD0PL5AG4hJgQIIgA
The text was updated successfully, but these errors were encountered: