Capítulo 93 de 116
The react-dom/client entry point is where a browser-rendered React app actually attaches to the page — its two APIs, createRoot and hydrateRoot, cover the two ways a React tree gets connected to real DOM nodes (fresh client-side rendering vs. taking over server-rendered HTML).
react-dom vs. react-dom/client: the base react-dom package holds the DOM-specific host components/props (<div>, <input>, etc. — Ch 96) and shared utilities (createPortal, flushSync); the /client subpath specifically holds the two root-creation APIs used to bootstrap a browser app.createRoot (Ch 94): for apps rendered entirely client-side, with no pre-existing server-rendered markup to reconcile with.hydrateRoot (Ch 95): for apps where the server already sent rendered HTML (SSR/SSG) and the client needs to attach event listeners and take over that existing markup rather than re-creating it from scratch..render() method is called with the top-level JSX to display, and which most apps only ever call once (the framework or entry-point file), not something invoked repeatedly through app logic.createRoot in a purely client-rendered app; reach for hydrateRoot whenever the server already produced the initial HTML.react-dom's host-component/prop reference (Ch 96) is a separate concern from these two root-attachment APIs.