3 ms·
I find react to be a very pleasant way to make websites, even static ones. And for static sites you can use SSR or something like GatsbyJS to make everything lo
by anchpop 7y ago
I find react to be a very pleasant way to make websites, even static ones. And for static sites you can use SSR or something like GatsbyJS to make everything load as if you had actually written the html (i.e. no dependence on javascript). That's the approach I use for my blog and according to google pagespeed the only problem with it is that the TTFB is too high (which is surprising because I host it as a totally static site on AWS)
- pier25 7y agoHow is it surprising that rendering a React website is slower than simple HTML?
- robertoandred 7y agoAn SSR React site IS simple HTML.
- pier25 7y agoDoesn't matter, React has to rehydrate which blocks the CPU. SSR solves waiting for the API but not the CPU problem.
- robertoandred 7y agoThat doesn't affect TTFB.
- pier25 7y agoAh you are right, my bad. I was thinking of TTFI.
- anchpop 7y agoThe server doesn't do any rendering before serving the page. All the "SSR" is done exactly once at build time. To the server it's no different from serving any other site.