dillon1000/react

Commit

Remove Passive flag from "before mutation" phase (#20038)

We don't need to visit passive effect nodes during before mutation.

The only reason we were previously was to schedule the root-level
passive effect callback as early as possible, but now that
`subtreeFlags` exists, we can check that instead.

This should reduce the amount of traversal during the commit phase,
particularly when mounting or updating large trees that contain many
passive effects.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberFlags.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.new.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…