Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regression test: Missing unmount after re-order
Adds a regression test for a bug I found in the effects refactor. The bug was that reordering a child that contains passive effects would cause the child to "forget" that it contains passive effects. This is because when a Placement effect is scheduled by the reconciler, it would override all of the fiber's flags, including its "static" ones: ``` child.flags = Placement; ``` The problem is that we use a static flag to use a "static" flag to track that a fiber contains passive effects. So what happens is that when the tree is deleted, the unmount effect is never fired. In the new implementation, the fix is to add the Placement flag without overriding the rest of the bitmask: ``` child.flags |= Placement; ``` (The old implementation doesn't need to be changed because it does not use static flags for this purpose.)
- Loading branch information