@wallhackio > hydration (the web development concept)
The what now? ![]()
@vaporeon_ @wallhackio when loading a webpage from a site developed in react in such a way that it uses what they call “server-side rendering” (SSR), you initially receive a page in an intermediary stage where the HTML is rendered. (befur SSR was the norm, client side JS was fully responsible fur rendering the entirety of the HTML on the page.) “hydration” refurs to the effect of loading extra JS to load the react runtime into the client, so that the page can do all the interactivity and client side rendering and client side routing expected of a react-based website
@vaporeon_ @wallhackio this is not limited to react
@aescling @vaporeon_ it just seems like something that should have always been there in the first place
@wallhackio @aescling @vaporeon_ transmitting a json blob over the wire and rendering it with javascript is faster than transmitting HTML over the wire and making it post facto dynamic, if your JS is fast and your rendered HTML is complex and your internet is slow
@wallhackio @aescling @vaporeon_ notably in a traditional SPA the javascript can be cached so the only thing you are requesting on each page load is a very small JSON blob, which is much lower bandwidth than sending entire rendered HTML pages every time somebody navigates to your site, which are constantly changing and not cacheable