Not sure about router change?

By using next for few month , I have a question: What magic happens when router change? Instead of empty html and a main js,next give me a contentful html and that is why nextjs is good for seo.After hydration,the page become reactive. I was thinking that Nextjs's job is done. Everything is just like SPA. But by changing to another route,things are getting unfamiliar. I got a json, Is it for hydration?Or just some props for the page? I try to open page source in chrome, I did see new content of new page!! God what is happening. poohheh
5 Replies
Neto
Neto•3y ago
check this theo video
Neto
Neto•3y ago
Theo - ping․gg
YouTube
How NextJS REALLY Works
NextJS is probably the best way to build your next React application. There are few better ways to do full stack with Javascript. Hopefully this video helps you better understand why! THANK YOU MIR FOR THE GRIND TO GET THIS OUT TODAY!!! ALL MY CONTENT IS FILMED LIVE ON TWITCH AT https://twitch.tv/theo ALL MY BEST MEMES ARE ON TWITTER FIRST htt...
gray0531
gray0531OP•3y ago
Thanks man. I reviewed the video. I have more confident in after the page load it is just a spa. And when router changes, we just aks for the page chunk(js) and page props (json) if needed.
Gaden
Gaden•3y ago
is this video still relevant after next 13?
gray0531
gray0531OP•3y ago
I also did know the points theo mentioned. In order to double confirm them, I turn into the network tab which is a little bit confused(a xxx.json request sent , I saw two cases, one is responses with poohheh and another one is json)(no idea about that) But I do know the key points overall. For now, I just assumed no matter what the responses are(during the client navigation), they will be transform into page props. 😆
Want results from more Discord servers?
Add your server