Hacker News new | ask | show | jobs
by dianthrow 3198 days ago
What you are looking at is called JSX[1]. It's not valid JavaScript, but is turned into function calls by transpilers such as Babel[2]. It's used as a more HTML-like syntax of writing function calls that output a representation of the DOM known as a "virtual DOM". You can embed JavaScript inside of JSX by using single curlies.

[1] https://facebook.github.io/jsx/

[2] http://babeljs.io/