#CSR only for specific routes

2 messages · Page 1 of 1 (latest)

sullen trout
#

Hey, I want my index "/" page to be ssr only and keep everything behind authenticated csr. Is it already enough to add ssr: false to the _authenticated.tsx layout or am I missing out some other changes I need to do? Appreciate any feedback!

coral spruce
# sullen trout Hey, I want my index `"/"` page to be `ssr` only and keep everything behind auth...

That should work.

Do take note that routes inside _authenticated.tsx cannot be SSR anymore.

See the relevant docs on selective ssr inheritance: https://tanstack.com/start/latest/docs/framework/react/guide/selective-ssr#inheritance

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...