dillon1000/react

Commit

[Bugfix] Reset `subtreeFlags` in `resetWorkInProgress` (#20948)

* Add failing regression test

Based on #20932

Co-Authored-By: Dan Abramov <[email protected]>

* Reset `subtreeFlags` in `resetWorkInProgress`

Alternate fix to #20942

There was already a TODO to make this change, but at the time I left it,
I couldn't think of a way that it would actually cause a bug, and I was
hesistant to change something without fully understanding the
ramifications. This was during a time when we were hunting down a
different bug, so we were especially risk averse.

What I should have done in retrospect is put the change behind a flag
and tried rolling it out once the other bug had been flushed out.

OTOH, now we have a regression test, which wouldn't have otherwise, and
the bug it caused rarely fired in production.

Co-authored-by: Dan Abramov <[email protected]>
Browse files
Changed paths3 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactWrongReturnPointer-test.js ModifiedM packages/react-reconciler/src/ReactFiber.new.js ModifiedM packages/react-reconciler/src/ReactFiber.old.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…