T
TanStack3mo ago
optimistic-gold

I want to make partial routes as spa and rest as ssr in tanstack start how can i achieve this

I have app route which i wanted to work as a spa but it's not using ssr props setting in the router function it is returning null
14 Replies
conscious-sapphire
conscious-sapphire3mo ago
can you please provide more context? ideally a complete example repo
optimistic-gold
optimistic-goldOP3mo ago
I'm trying to migrate a tanstack router app to tanstack start which has a lot of logic client side in beforeLoaders and stuff. I want to keep the app as it is without having to rewrite a lot. So I was wondering if there was a way to have a single path like /app routes client side and no SSR.
conscious-sapphire
conscious-sapphire3mo ago
it's almost possible. we have a flag ssr:false in the route, however it's still running beforeLoad/loader on the server. we have an open PR for this so this will be soon resolved
optimistic-gold
optimistic-goldOP3mo ago
Do you know how much time it will take? I'm blocked on this
conscious-sapphire
conscious-sapphire3mo ago
I can have a look at this next week
evident-indigo
evident-indigo3mo ago
Just ran into this. am I able to disable SSR for an entire route? I tried it but it did not work
conscious-sapphire
conscious-sapphire3mo ago
yes you can, set ssr:false however, still beforeLoad and loader runs on the server soon to be fixed
evident-indigo
evident-indigo3mo ago
Is there any pull request I can follow this on? was this fixed? Is there a way I can contribute to get this done if you link the existing PR?
conscious-sapphire
conscious-sapphire3mo ago
i am on this at the moment
evident-indigo
evident-indigo2mo ago
is there a PR or branch to follow? I may be able to help with testing or contributing.
conscious-sapphire
conscious-sapphire2mo ago
yes here is the PR now
conscious-sapphire
conscious-sapphire2mo ago
GitHub
Release v1.125.0 · TanStack/router
Version 1.125.0 - 7/5/25, 12:36 PM Changes Feat ssr setting per route (#4565) (d728d69) by Manuel Schiller Packages @tanstack/router-core@1.125.0 @tanstack/solid-router@1.125.0 @tanstack/react-r...
optimistic-gold
optimistic-goldOP2mo ago
Hey @Manuel Schiller is there any example template for using this (react tanstack start with tanstack query)? I am following https://tanstack.com/start/latest/docs/framework/react/examples/start-basic-react-query?path=examples%2Freact%2Fstart-basic-react-query%2Fsrc%2Froutes%2F__root.tsx but this isn't working for me
React TanStack Start Start Basic React Query Example | TanStack Sta...
An example showing how to implement Start Basic React Query in React using TanStack Start.

Did you find this page helpful?