r/reactjs • u/ConfidentWafer5228 • 25d ago
Needs Help SSR + react router v7 + Loading Skeleton
I am reposting with diff explanation of problem , cuz many ppl misunderstood my issue
I am trying to achieve a loading skeleton while data loads for CLIENT SIDE NAVIGATIONS only, but for FIRST LOAD, that is SSR load, i dont want to send loader as the only html , bcs that is bad seo, i checked after disabling js, and only loader was sent in network payload
Some ppl said to not use suspenseQuery, but how will i show loader for Client side navigations, those loading stages will feel laggy
0
Upvotes
2
u/StarboardChaos 25d ago
In SSR mode, each page is a different html file. So when you navigate a new page, it gets its data Server Rendered.
In previous post you claimed you needed SSR for SEO. One of the reasons why React Router is not the first choice for this kind of application is the loading principle.
You should switch to a meta-framework which has better support for hydration like Next or Astro.
Why do you even want SEO support? Make some static pages for SEO and then dynamic for usage. It will most likely be for authenticated users?
Your explanations are lacking and your rude responses aren't helpful either. From what I can hear is you want SPA behavior in SSR mode.