News for hackers. Stuff that matters.
Re:A Primer for Building Single Page Applications with React by dada78641 on Tuesday March 24, 2015 @07:31AM (#9255905)
Basically, the paradigm has you make small components with the JS, HTML (actually XML) together, and optionally the CSS too. The reason why this works is because the HTML and JS work together to make up the structure of your component, so there's not really much of a reason to separate them. And if your component is nice and small, there's only a small amount of HTML to worry about.

The idea is to think of your HTML as a part of your app, rather than just "something that is modified by the JS".

There are no comments on this comment yet.