dillon1000/react

Commit

DevTools should properly report re-renders due to (use)context changes (#22746)

Note that this only fixes things for newer versions of React (e.g. 18 alpha). Older versions will remain broken because there's not a good way to read the most recent context value for a location in the tree after render has completed. This is because React maintains a stack of context values during render, but by the time DevTools is called– render has finished and the stack is empty.
Browse files
Changed paths2 files
First-parent comparison
A packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js AddedM packages/react-devtools-shared/src/backend/renderer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…