3 ms·
This is already here and in use. See Next.js using React.js for example. Server-side rendering out of the box and small next needed pieces are loaded continuous
by badestrand 3y ago
This is already here and in use. See Next.js using React.js for example. Server-side rendering out of the box and small next needed pieces are loaded continuously when they are needed.
- sanderjd 3y agoNice! Anecdotally this still doesn't seem to be the dominant way that web apps I use are implemented. Is this just taking awhile to get mindshare, or are there some drawbacks keeping most people from using it?
- alexanderchr 3y agoBecause it adds a lot of complexity for the small benefit of shorter initial load times. There are many issues, for example you need to make sure that all your front end code runs both in the browser and in node. You need to mark parts of your UI to not server render, you need to be aware of the timing between the site being loaded and hydration being finished (a text input might have some value prefilled from the server and may be changed by the user before hydration finishes). Just from the top of my head. My experience is that most of the time it’s better to make your public facing site fully SSR and then make the actual app fully client side rendered. You usually don’t need that much interactivity for your public site and your app users don’t mind a few seconds startup time. You also usually don’t need SEO for your app because it’s behind authentication anyway. Exceptions exist of course.
- sanderjd 3y agoVery helpful! Those are basically the same drawbacks as a decade ago. I guess my question to the folks here saying hybrid is the way to go nowadays is: Have these problems been solved in your view?