3 ms·
> It's just not hip anymore, because it wasn't invented within the past 36 months. Yes, technology moves in cycles but statements like this grossly generalize.
by thr0wawayf00 4y ago
> It's just not hip anymore, because it wasn't invented within the past 36 months.
Yes, technology moves in cycles but statements like this grossly generalize.
The amount of Javascript running on the web has exploded over the last decade plus to the point that frameworks like React were released to create more modern, interactive experiences because that's what business demanded. Then the industry started figuring out that the virtual DOM was kind of a scam from a performance standpoint and started looking for ways to achieve better performance and SEO, which brought us back to SSR and more advanced client/server architectures like this.
- quelltext 4y ago> Then the industry started figuring out that the virtual DOM was kind of a scam from a performance standpoint Could you elaborate? Not a frontend guy but my understanding was that the virtual DOM is what's necessary to enable a simplified model where you can code as if your entire view was rerendered from scratch when there's a change. Mutating the DOM only where and when you need to in a handcrafted fashion is always going to be faster, it's just not scalable, I guess. So, in that context the virtual DOM is not really a scam. Not sure in what sense it is? Was it claimed to be performing better than it does?
- ratww 4y agoYour understanding is correct. Virtual DOM never promised better performance than pre-rendered static HTML. It only achieves better performance (and better UX) than dumbly re-rendering the whole website whenever the underlying data changes. The reason people are doing SSR with modern JS-frameworks is quite simple: some kinds of content aren't a good fit for SPAs (or maybe there are other constraints that favour rendering it all in the server), but it might still be desirable to use modern JS-frameworks. For example: you wouldn't implement a blog as an SPA, but it might still be desirable to use React to render everything.