T
TanStack2mo ago
xenial-black

CSR/SSR/Prerendering per route

How can I create an application that combines all these renderings and defines them per route? For example, I have the following routes: - /: this must be prerendered since it is the home page - /app/* everything inside of /app must be CSR, like a SPA For the prerendering I believe I can use something like:
tanstackStart({
pages: [
{
path: "/",
prerender: { enabled: true },
},
],
}),
tanstackStart({
pages: [
{
path: "/",
prerender: { enabled: true },
},
],
}),
But what about SPA for all routes under /app?
3 Replies
quickest-silver
quickest-silver2mo ago
please ask start questions in #start-questions in future
quickest-silver
quickest-silver2mo ago
Selective Server-Side Rendering (SSR) | TanStack Start React Docs
What is Selective SSR? In TanStack Start, routes matching the initial request are rendered on the server by default. This means beforeLoad and loader are executed on the server, followed by rendering...
xenial-black
xenial-blackOP2mo ago
oh sure, didn't notice. Thanks!

Did you find this page helpful?