Rendering Strategies
Choose between SPA, SSR, and hybrid rendering per route.
Recommended approach
Pick rendering strategy per route, not per app.
- Default to SPA for authenticated product surfaces (dashboards, admin, settings).
- Use SSR for public entry routes where SEO and first-load speed matter.
- Good rule of thumb: if the route should be indexable by search engines or shared on social media with a rich preview, it likely needs SSR.
Route decision matrix
| Route type | Primary goal | Default strategy | Notes |
|---|---|---|---|
| Logged-in dashboard | Fast in-app navigation | SPA | SSR often adds infra cost without user value here. |
| Marketing landing pages | SEO and fast first paint | SSR or even SSG | Cache aggressively at CDN/edge. |
| Public product detail pages | SEO plus rich interactions | Hybrid | SSR shell + client-side interactive sections. |
| Authenticated settings | Fast navigation, low SEO value | SPA | SSR adds cost without SEO benefit. |
| Blog or documentation | SEO and readability | SSR or SSG | Content changes infrequently, so build-time generation can work well. |
Alternatives and when to choose them
- Static pre-render for selected routes when content changes infrequently and build-time generation is acceptable.
Implementation checklist
- Classify routes into
publicandauthenticatedbefore implementation. - Define route-level rendering defaults in your framework conventions.
- Add route-level loading and error boundaries for both server and client transitions.
- Add caching rules per route class (HTML, API, and asset cache behavior).
- Measure LCP, INP, and TTFB separately for SSR and SPA routes.
- Document exceptions where the default strategy is intentionally overridden.
When to switch strategy
Revisit a route strategy when at least one of these is true:
- SEO impressions are important but route HTML is client-only.
- Infra cost rises with little UX gain from server rendering.
- User feedback indicates slow first paint or interactivity on important routes.
Common pitfalls
- Treating SSR as universally faster.
- Running SSR for authenticated-only screens where it adds cost only.
- Ignoring cache strategy, which makes SSR look slower than it should.
- Mixing route conventions so teams cannot predict rendering behavior.