You shouldn't have to rewrite an app to change how it's hosted.
A marketing site that later needs a dashboard, or a dashboard that later needs a fast landing page — both are the same route tree with a different rendering mode switched on.
Same routes and components, three ways to serve them
Shared input
Routes + components
One authored application model.
- Browser
Single Page Application
SPA - Server, then browser
Server Side Rendering
SSR + hydration - Build
Static Site Generation
SSG
Switching modes is a boot-file change, not a rewrite
Swap createSPA for hydrateSPA and a server-rendered document, and the browser takes over the same component tree. Route loaders, params, and render data work the same way regardless of where the HTML came from.
A loader that shouldn't block the first paint is marked defer explicitly — you choose what's slow and deferred, rather than the framework guessing.