Files
react/packages
Brian Vaughn f7278034de Flush all passive destroy fns before calling create fns (#17947)
* Flush all passive destroy fns before calling create fns

Previously we only flushed destroy functions for a single fiber.

The reason this is important is that interleaving destroy/create effects between sibling components might cause components to interfere with each other (e.g. a destroy function in one component may unintentionally override a ref value set by a create function in another component).

This PR builds on top of the recently added deferPassiveEffectCleanupDuringUnmount kill switch to separate passive effects flushing into two separate phases (similar to layout effects).

* Change passive effect flushing to use arrays instead of lists

This change offers a small advantage over the way we did things previous: it continues invoking destroy functions even after a previous one errored.
2020-02-11 09:52:54 -08:00
..
2020-01-25 08:43:02 -08:00
2020-01-09 13:54:11 +00:00
2020-01-09 14:50:44 +00:00
2020-01-12 17:54:30 +00:00
2020-01-09 14:50:44 +00:00
2020-01-09 13:54:11 +00:00