Client-Side Rendering
The browser receives an empty shell and then fetches the data using JavaScript. This allows for rich interactive experiences like real-time filtering and complex state management, but can be slower on initial load.
Refresh to see the 'Loading' state trigger in your browser.
Strategy
Rendered entirely in the browser using `useEffect`. Ideal for interactive dashboards, search interfaces, and private user areas.
Hydration
React takes over after JS loads. The server sends zero initial content.
Inspect Network
Open DevTools > Network. Look forCache-Controlheader. For CSR, you will seeno-store / no-cache
Live Demo
These products were fetched using Client-Side Rendering (CSR) in your browser.
Refresh to see the "Initializing" state. Notice how the page shell loads first.Note: In this lab, we forced the CSR shell to be dynamic to show fresh cache headers.
Initializing Client Hydration...
Advanced Pattern: Selective Rendering
Scroll down to see the LazyHydrate component in action. Products after the first 4 are wrapped in an Intersection Observer. They won't actually mount or render until they enter the viewport, saving CPU cycles on the initial hydrate.