-
Notifications
You must be signed in to change notification settings - Fork 50.6k
Open
Labels
Component: ReconcilerReact Core TeamOpened by a member of the React Core TeamOpened by a member of the React Core TeamType: Enhancement
Description
In Fiber there are a number of states that a component can be in. However, it is not formalized in the code right now. Instead, the state is inferred. This leads to hard to follow code. Instead we can organize the code in terms of explicit states - which is what the original prototype did.
Before componentDidMount (i.e. current === null):
- Never begun.
- Have been begun before but never completed.
- Have been completed before, not committed, but hasn't begun this time around.
- Begun but not yet completed.
- Completed but not yet committed.
After componentDidMount (i.e. current !== null):
- Haven't begun an update yet
- Have been begun before but never completed.
- An update have been completed before, not committed, but hasn't begun this update.
- Begun update but not yet completed.
- Completed update but not yet committed.
The "children" set of a component also have some states:
- Never reconciled.
- The current set last committed.
- A previously reconciled set that hasn't committed yet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: ReconcilerReact Core TeamOpened by a member of the React Core TeamOpened by a member of the React Core TeamType: Enhancement