Commit is the final phase of a React update: the point when prepared changes are applied to the real DOM. Rendering first builds a work-in-progress tree without changing the DOM; pre-commit prepares the updates. After reconciliation identifies the needed changes, commit applies them synchronously and irreversibly. section 4.1
To distinguish commit from the work before it, trace what becomes observable:
- Render prepares a representation of the next UI; it does not yet update the real DOM. section 4.1
- Pre-commit batches and checks pending changes so the UI avoids an intermediate, partially rendered state. Class components may run getSnapshotBeforeUpdate() here. section 4.1
- Commit updates the DOM and sets up refs and layout effects. This phase also includes effect hooks and class lifecycle methods such as componentDidMount() and componentDidUpdate(). section 4.1
Interview follow-up
If asked how React moves from a Virtual DOM comparison to a visible update, name the render, pre-commit, and commit phases. Then identify commit as the actual DOM-update step, rather than saying that building the work-in-progress tree changes the page. Connect batching and changes limited to affected components to fewer costly DOM manipulations. section 1.3 section 4.1
Figure 4.4 React's rendering process: render, pre-commit, and commit phases.
Use the phase diagram to locate commit after render and pre-commit, where prepared work becomes a real DOM update. section 4.1







