dillon1000/react

Commit

Add warning if return pointer is inconsistent (#20219)

Bugs caused by inconsistent return pointers are tricky to diagnose
because the source of the error is often in a different part of the
codebase from the actual mistake. For example, you might forget to set a
return pointer during the render phase, which later causes a crash in
the commit phase.

This adds a dev-only invariant to the commit phase to check for
inconsistencies. With this in place, we'll hopefully catch return
pointer errors quickly during local development, when we have the most
context for what might have caused it.
Browse files
Changed paths3 files
First-parent comparison
A packages/react-dom/src/__tests__/ReactWrongReturnPointer-test.js AddedM packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.new.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…