Effects list refactor continued: did-bailout flag#19322
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b044185:
|
Details of bundled changes.Comparing: 61dd00d...b044185 react-dom
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (stable) |
Details of bundled changes.Comparing: 61dd00d...b044185 react-dom
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (experimental) |
Process deletions as we traverse the tree during commit, before we process other effects. This has the result of better mimicking the previous sequencing.
0d1a83e to
7171494
Compare
|
Overall the implementation looks right, exactly what I had expected. 👍 There are a few other bailout cases in begin phase where we need to set the Basically anywhere there's a |
| export const DidBailout = /* */ 0b0001; | ||
| export const BeforeMutation = /* */ 0b0010; | ||
| export const Mutation = /* */ 0b0100; | ||
| export const Layout = /* */ 0b1000; |
There was a problem hiding this comment.
As a follow up, we should move the Incomplete, ShouldCapture, and DidCapture flags to this new field.
* Effects list rewrite * Improved deletions approach Process deletions as we traverse the tree during commit, before we process other effects. This has the result of better mimicking the previous sequencing. * Made deletions field nullable * Revert (no longer necessary) change to ReactNative test * Eagerly set Deletions effect on Fiber when adding child to deletions array * Initialize deletions array to null * Null out deletions array instead of splicing 🤡 * Removed TODO comment * Initial exploration on a did-bailout flag * fixed the rest of the bugs * Rolled temporary didBailout attribute into subtreeTag * addressed comments * Removed DidBailout subtree tag * Removed stale comment * use while loop instead of recursion for siblings * move bailout flag from while loop * Removed some unnecessary Deletion effectTags from children * Move Deletion effect assignment to deletions array initialization Co-authored-by: Luna <lunaris.ruan@gmail.com>
Builds on top of #19261
subtreeTagto use its own meta values rather than copyingeffectTagvalues.View only the delta.