dillon1000/react
Commit
Browse files [Devtools] Look for a ReactMemoCacheSentinel on state (#28831)
The useMemoCache polyfill doesn't have access to the fiber, and it simply uses state, which does not work with the existing devtools badge for the compiler. With this PR, devtools will look on the very first hook's state for the memo cache sentinel and display the Forget badge if present. The polyfill will add this sentinel to it's state (the cache array).
Changed paths2 files
First-parent comparisonpackages/react-devtools-shared/src/backend/ReactSymbols.js ModifiedM packages/react-devtools-shared/src/backend/renderer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…