Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is not React's, but a javascript preprocessor called JSX that compiles to JS (like LESS -> CSS).

http://facebook.github.io/react/docs/jsx-in-depth.html

Something like <Map foo={bar}/> would compile to a function call Map({foo: bar}). Behind the scenes, React is not dealing with HTML.

You can use React without JSX, but it's useful.



Is React a client-side framework, or server-side?


It's primarily client-side, but React components output a virtual representation of the DOM, so it's relatively simple to render a page on the server and return HTML.


Generally you run the JSX pre-processor server-side and then everything else gets run client-side.


It's a client-side framework. You'll generally run the JSX preprocessor as part of your website's build process (i.e. before uploading it to a server).


both; either




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: