Server vs Client Routing Boundaries
What you'll learn: How to distinguish where routing logic executes in modern React apps—server or client—and why it matters for performance and user experience.
In traditional single-page apps (SPAs), all routing happens in the browser: clicking a link updates the URL and JavaScript swaps out components without a server round-trip. But with React Server Components and frameworks like Next.js App Router, routing now spans two worlds—some navigation happens on the server, some on the client.
Where the Boundary Lies
Server-side routing occurs when:
- Initial page loads render on the server (SSR or RSC)
- Navigation triggers a new server request for RSC payload
- You're fetching data during route transitions using server components
Client-side routing occurs when:
- Navigation happens entirely in the browser (like SPA behavior)
- Only client components and their data update
- Interactive state persists across route changes
Think of it like a restaurant: server routing is ordering a completely new dish (kitchen prepares it), while client routing is swapping side dishes already on your table (instant, no kitchen trip).
Implications
For data fetching: Server routes let you fetch data before rendering, avoiding waterfalls. Client routes may require useEffect patterns or client-side query libraries.
For user experience: Server routing shows loading states during transitions but keeps HTML fast. Client routing feels instant but may flash loading spinners if data isn't prefetched.
The hybrid approach: Modern frameworks blur these lines—Next.js App Router uses server routing by default but prefetches linked routes in the background, making subsequent navigation feel client-side fast while maintaining server benefits.
Key Takeaway: Understanding whether routing happens server or client-side determines your data-fetching strategy, loading patterns, and whether interactive state survives navigation—critical for architecting performant, seamless UX.