Conceptually, React does work in two phases:
render
and then compares the result to the previous render.componentDidMount
and componentDidUpdate
during this phase.The commit phase is usually very fast, but rendering can be slow. [[Concurrent React]] aims to break the rendering work into pieces to avoid blocking the browser. This means render phase lifecycles anre invoked zero, once, or multiple times before committing.
The entire process is known as [[reconciliation]].