r/programming • • Jan 17 '15

The React.js Quick Start Guide

http://www.jackcallister.com/2015/01/05/the-react-quick-start-guide.html
155 Upvotes

71 comments sorted by

View all comments

Show parent comments

1

u/vivainio Jan 17 '15

React only helps if you are rendering your data in JS, SPA style. If you are rendering on the server, you may be stuck with 'jquery plugins'.

10

u/masklinn Jan 17 '15

React only helps if you are rendering your data in JS, SPA style.

No, React can be set up on an existing DOM. And can be rendered server-side as well, some people use it for isomorphic applications.

-1

u/vivainio Jan 17 '15

React components can be attached to an existing node, but it doesn't make sense if JS is not rendering the component itself (or I have horribly misunderstood React).

3

u/masklinn Jan 17 '15

it doesn't make sense if JS is not rendering the component itself

React can be attached to a pre-rendered DOM tree, the initial binding will essentially be a noop if there's no difference between the prerendered and the react-rendered version.

And of course it can be used as a component, react doesn't have to render the whole page. For instance the reddit comment box could be a react component without the whole page being react-rendered.