3 ms·
I think what you are getting at is what the new nextjs is. Everything is just plain server rendered HTML by default and you opt into client side react on a per-
by terandle 3y ago
I think what you are getting at is what the new nextjs is. Everything is just plain server rendered HTML by default and you opt into client side react on a per-subtree basis depending on if you need it or not.
Some other neat bonuses are:
- Page transitions still use client side routing so it still feels fast like a SPA, and it automatically preserves state on your outer layouts during page changes.
- And something I find mind blowingly impressive is you can refresh the server rendered HTML at any point while the user is on the page while still preserving all of their client side state and scroll position etc. A simple call to `router.refresh()` is all you need to do that, something that would have taken a good amount of API code and shoving stuff into some state management library etc to do before.