mount
When React creates a component for the first time and adds its DOM nodes to the page.
In more detail
Effects run their setup after mount. Changing a key or element type causes a remount: the old instance is unmounted and a brand-new one with initial state is mounted. In development, Strict Mode deliberately mounts, unmounts and remounts components to test cleanup.
Related terms
- unmount — When React removes a component and its DOM nodes from the page, discarding its state.
- useEffect — The React hook for running side work, such as adding listeners or changing document.body, after a component renders.
- component identity — How React decides that a component in the new render is the same one as before, so it keeps its state.
Taught in
- State with useState: Immutability And Asynchronous Batching — React 19 & Modern Component Architecture
- Keys In Depth: Identity Preservation And Identity Resetting — React 19 & Modern Component Architecture
- Diffing Algorithm: Element Type Shifts And Subtree Tear Down — React 19 & Modern Component Architecture
- SyntheticEvent System: Event Delegation in Modern React — React 19 & Modern Component Architecture
- useEffect Lifecycle: Mount, Dependencies, And Cleanup Phases — React 19 & Modern Component Architecture
- Avoiding Effect Antipatterns: Derived State And Events — React 19 & Modern Component Architecture
- useLayoutEffect vs useEffect: Painting And Synchronous Reads — React 19 & Modern Component Architecture
- useRef Mechanics: DOM References And Mutable Persistent State — React 19 & Modern Component Architecture
- Lifting State Up: Colocation, Ownership, And Data Flow — React 19 & Modern Component Architecture
- useContext in Depth: Scoping, Consumer Subscription Costs — React 19 & Modern Component Architecture