React DOM visual mental model
React describes UI. React DOM is the renderer that connects React's model to the browser DOM.
Components, Hooks, state, Context, Suspense, transitions, and element descriptions live in React's programming model.
React DOM knows how React elements map to DOM nodes, browser events, forms, hydration, portals, and DOM-specific APIs.
HTML semantics, focus, layout, paint, CSS, accessibility APIs, events, and the actual DOM remain browser responsibilities.
Portals change DOM placement, not React ownership
Context, React event propagation, and component ownership follow the React tree.
A modal or tooltip can be inserted into a separate DOM container using a portal.
flushSync is an escape hatch
React can batch and coordinate work for responsiveness and consistency.
Use only when an external/browser API requires the DOM to be updated before the next imperative step.
React DOM does not replace the platform
Use native elements for built-in meaning, keyboard behaviour, and accessibility.
React DOM can interoperate with web components, but their contracts remain platform contracts.
React DOM maps React props onto host-specific DOM/SVG behaviour.
Choose the boundary intentionally
Keep this mental model
Continue with Portals and flushSync for the detailed browser-renderer APIs.