Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Decouple update queue from Fiber type #12600
The update queue is in need of a refactor. Recent bugfixes (#12528) have exposed some flaws in how it's modeled. Upcoming features like Suspense and [redacted] also rely on the update queue in ways that weren't anticipated in the original design.
Details of bundled changes.
TODO after chatting to @sebmarkbage:
@gaearon I reverted some of this in the most recent commit, to optimize for class components, but according to @sebmarkbage, some things to consider are whether we're in a hot path, and the impact on file size.
So ReactChildFiber is a big file because of all the duplication, but we live with it because reconciliation is a super hot path and the file size is worth it. Queuing and processing updates is not a hot path, so we trade off file size for some extra closures.