4 ms·
server rendering is cool until you have to pay the bill. this is why I am a bit skeptical of the react server components push.
by nfRfqX5n 3y ago
server rendering is cool until you have to pay the bill. this is why I am a bit skeptical of the react server components push.
- hermanradtke 3y agoEspecially since server side rendering react is a lot more expensive than server side rendering something like a mustache template.
- zelphirkalt 3y agoWhy are they not using caching? Does a component have to be rendered differently for each and every visitor? Is there anything that makes caching impossible? In the end it is just a bunch of HTML, CSS and JS being delivered to a browser somewhere. Why is it hard to cache properly?
- DanielHB 3y agoclient-rendered SPAs can cache the delivery of JS/HTML/CSS and have only raw data requests be optionally-cacheable server-rendered SPAs mix JS/HTML/CSS with data meaning that if the data served by a request is not cacheable, nothing is when a page has data that is tied to a specific user it becomes very hard to have cache-hits, at least of the dirty-cheap CDN kind of caching type
- nfRfqX5n 3y agocaching costs money too though
- DanielHB 3y agoI am skeptical because most applications don't really benefit from being server rendered. Say what you will about performance but if you keep your bundle sizes within reason and apply a small dose of lazy-loading for big dependencies web apps are just fast enough for the majority of the code being written today. And unlike client-rendered SPAs, server-rendered don't fundamentally change how you write your code. Going from template-engine + form-redirects for mutations to an SPA is like unlocking super-powers in the user flows possible and developer capabilities. Going from SPA to server-rendered SPA brings very little new user-flow capabilities or developer-experience benefits, while bringing many downsides. Crazy good performance and SEO is only required for websites that need to grab attention within 200ms before the user closes it down. The fact is, most code being written today is not for this kind of application and smartphones got massively better as well. This is eerie similar to the old days of unix shared-terminals (one mainframe serving a lot of independent terminals) vs micro-computers