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

> and using string concatenation

React.js uses a "virtual DOM" made up of JavaScript objects, so there isn't any concatenation of HTML strings, just generation of virtual DOM objects. The next step up from that is their JavaScript variant, JSX, which has HTML-like syntax for instantiating those virtual DOM objects.

JSX looks quite like HTML templates, except the programming logic (which in a templating language might be {{if foo}} ... {{/if}} etc) is plain JavaScript. Introduction to JSX here: http://facebook.github.io/react/docs/jsx-in-depth.html

Slide 49 has a bigger example, and the slide before shows the plain JavaScript version: http://murilopereira.com/the-case-for-reactjs-and-clojurescr...



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

Search: