2 ms·
I was referring to static sites, which the post talks about quite a bit. JSX is just a sane templating language. Much of the hydration stuff is accidental comp
by zamalek 3y ago
I was referring to static sites, which the post talks about quite a bit. JSX is just a sane templating language.
Much of the hydration stuff is accidental completely, I would argue that all is with the advent of search engine scrapers that give the page some time to render. The goal of including associated data for the first render is essential complexity - it can save up to 200ms of latency, but there are simpler ways to do that (such as data islands, early hints, or SSE). At that point JSX is, again, nothing more than a really good templating language.
Data islands are my choice because they worked in the 90s meaning they will certainly work today. XML back then, but JSON works just as well. Of course, hydration is assumed to be the only solution for the react-size-fits-all crowd.