Turning off SSR doesn't seem to work #4616
JonasMerxbauer
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm newbie in using Tanstack router/start so I'm not sure if it's a issue or me just being dumb.
I need to have a whole app without SSR. I found in docs that that should be possible with SPA mode.
Tried using this example: https://github.com/TanStack/router/tree/main/examples/react/start-basic-static
When I put console log into src/routes/index.tsx Home component, I can see that it logs on server and when I try to use Date in the component it causes hydration error.
So I tried to use Selective Server-Side Rendering (SSR).
Putting this code
{ defaultPendingComponent: () => <div>Loading...</div>, defaultSsr: false, }
into router.tsx causes app to get stuck on Loading...Originally I tried in my app (that is not using SPA mode) to achieve no SSR by using the Selective Server-Side Rendering (SSR) method but I have ran into same issue with being stuck on defaultPendingComponent or empty html if no defaultPendingComponent included.
Per route turning off ssr seems to work fine.
Beta Was this translation helpful? Give feedback.
All reactions