event propagation
The journey of an event through the DOM: down from the window to the target (capturing), at the target, then back up (bubbling).
In more detail
The browser computes the path from window to target once, then calls matching listeners along it in three phases. stopPropagation ends the journey early.
Example
Adding Capture to a React handler name, as in onClickCapture, runs it in the capture phase.Related terms
- capturing phase — The first phase of event propagation, in which the event travels down from the window through each ancestor toward the target.
- target phase — The middle phase of event propagation, in which listeners registered directly on the event's target element run.
- event bubbling — The way an event on an element also triggers handlers on its parent elements, one level at a time up the tree.
- stopPropagation — An event method that stops the event from travelling to further elements, while other listeners on the current element still run.
Taught in
- Event Phases: Capturing, Target And Bubbling Demystified — Frontend Architecture & Web Platform
- Event Delegation: Memory-Efficient Interaction Handlers — Frontend Architecture & Web Platform
- CustomEvent Dispatching And Decoupled Component Event Buses — Frontend Architecture & Web Platform
- SyntheticEvent System: Event Delegation in Modern React — React 19 & Modern Component Architecture
- useEffect Lifecycle: Mount, Dependencies, And Cleanup Phases — React 19 & Modern Component Architecture
- useImperativeHandle: Controlled Ref Forwarding Boundaries — React 19 & Modern Component Architecture
- Creating Event Listener Hooks with Clean Teardown Logic — React 19 & Modern Component Architecture
- React Portals: Escaping Stacking Contexts for Modals — React 19 & Modern Component Architecture
- Render Diagnostics: Profiling Re-Renders with React DevTools — React 19 & Modern Component Architecture