News for hackers. Stuff that matters.
Re:Text-only CNN by josteink on Sunday September 10, 2017 @03:23PM (#15213825)
Simply put, React lets you do two things:

* Generate a HTML/DOM based on a template and data.

* Lets you efficiently update that DOM based on updates to the data and/or model (this is it's killer feature).

But if you're just going to do the first thing (generate a HTML/DOM), you don't need most of React's feature set, and you certainly don't need to push heavy JS onto the client.

For those cases, a much better approach (for both clients and SEO) is to just pre-render the DOM/HTML server-side and serve that without any need for any javascript client-side (which is what the similarly named module "Preact" does).

There are no comments on this comment yet.