Good fit
- Teams that added 'use client' everywhere to suppress boundary errors
- Next.js 13/14 apps with hydration warnings on multiple pages
- Applications where the RSC migration increased bundle size instead of reducing it
You started migrating to React Server Components and now you have 'use client' / 'use server' boundary errors, hydration mismatches across pages, and a state management pattern that does not work across the boundary. Your team added 'use client' to everything to make the errors stop.
For teams that started migrating to RSC, hit boundary errors, and added 'use client' everywhere, losing the performance benefit entirely. RSC requires a different mental model than traditional React. These mistakes are how most migrations fail.
The team hit boundary errors and added 'use client' to every component that errored. Because the directive marks that module and everything it imports as client, most components ended up client-rendered. The app ships the same JavaScript bundle as before, or larger. Marking large parts of the UI client instead of just the interactive leaves is the most common way an RSC migration ends up heavier than the app it replaced. RSC added complexity but removed zero bytes.
Your global state pattern (Context, Zustand, Redux) assumes every component is a client. Server components cannot use useState, useEffect, or subscribe to stores, and a context provider is itself a client component, so wrapping the app in one at the root forces the whole tree client. The state architecture needs to be split: server data fetched in server components and passed down as serializable props, client interaction state isolated in leaf client components, and the provider pushed down to wrap only the subtree that actually reads it.
Client components rendered during SSR that read window, localStorage, or navigator, or that call Date.now() and Math.random() during render, cause hydration mismatches because the server output no longer matches what the client produces on first render. When React detects the mismatch it discards the server HTML for that subtree and re-renders on the client, which costs you the SSR benefit and shows up as flicker and layout shift. Pages with warnings touch browser-only or non-deterministic values during render instead of deferring them to useEffect after mount, using useId for generated ids, or reading the value from a cookie that both server and client can see.
Best fit when you started the migration, hit complexity you did not expect, and the codebase is in a worse state than before.
Teams apply RSC like a library upgrade instead of an architecture change.
We classify every component, draw the correct boundaries, and restructure the state management to work with RSC.
Classify every component: does it use hooks, event handlers, or browser APIs (client) or does it just render data and children (server)? Map the dependency graph. Identify incorrect 'use client' directives.
Extract interactive pieces into focused client components. Convert data-fetching components to server components. Proof release: every component that can be a server component is one, with clean boundaries.
Split state management: server data fetched with RSC, client interaction state managed locally. Fix every hydration mismatch. Verify bundle size reduction.
RSC decision tree for the team: when to use server vs client components. Bundle size comparison showing the improvement. Patterns for common RSC scenarios.
A correct RSC architecture that delivers the performance benefits the migration was supposed to provide.
We have done this migration correctly on production applications.
We have migrated multiple production applications to RSC on React 19 and the Next.js App Router. We know the common traps: context providers that force client boundaries, client-only third-party libraries that have to be isolated behind a wrapper, dynamic imports with ssr:false that can no longer be called from a server component, and state patterns that need restructuring rather than porting.
Boundary errors Client/server boundary errors
Boundary errors, hydration mismatches, no performance benefit.
Fixed scope, fixed price.
Usually not worth it. You have already paid the migration cost. The issue is incorrect boundaries, not RSC itself. Fixing the boundaries fits well inside the sprint. Reverting takes about as long and you lose the performance benefit.
Yes, that is our approach. We do not rewrite the entire app. We correctly classify existing components, extract small client pieces where needed, and convert the rest to server. It is restructuring, not rewriting.
We wrap them in focused client components. The wrapper is the only client component, and everything around it stays server. For heavy libraries we use the composition pattern: render the library output on the server and pass it as children into a small interactive client wrapper, so the library code never reaches the browser bundle. This is the standard RSC pattern for client-only libraries.
It depends on how much of your tree is genuinely interactive. App Router migrations that draw boundaries correctly ship noticeably less client JavaScript, with the biggest wins on content-heavy routes where data fetching, markdown, and formatting all move to the server. For an app whose RSC migration currently shrank nothing, the gain is larger because almost everything is wrongly marked client today. We measure your First Load JS before and after so the number is yours, not a generic estimate, and your Lighthouse and INP scores move with it.
Hydration mismatches happen when the server-rendered HTML differs from what the client produces on first render, so React throws away the server output and re-renders that subtree on the client. The usual culprits are Date.now() and locale-specific date formatting, Math.random() or random ids, reads of window, localStorage, or navigator, and conditional rendering keyed off client-only state. We trace every mismatch to its source and apply the right fix per case: defer browser-only reads to useEffect after mount, use useId for generated ids, read SSR-needed values from a cookie both sides can see, and reserve suppressHydrationWarning for genuinely unavoidable values like a live timestamp.
Server components cannot use hooks or state, and a context provider is a client component, so a root-level provider quietly forces the whole tree client. We restructure your state so server components fetch data and pass it down as serializable props, while only the minimal interactive pieces hold client state, and any provider is pushed down to wrap just the subtree that reads it. For writes we lean on Server Actions instead of round-tripping through client state. You get simpler state management because most of your data no longer needs client-side state at all.
ByKostadin StambolievFounder and Imaginator
Published Updated