dillon1000/react

Commit

[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).
Browse files
Changed paths2 files
First-parent comparison
M packages/react-devtools-shared/src/backend/ReactSymbols.js ModifiedM packages/react-devtools-shared/src/backend/renderer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…