Hacker News new | ask | show | jobs
by tuukkah 1367 days ago
Yes, JSX (and React) is interesting in this way: it's not a (full) template language. Instead, it's a convenient way to write component fragments that include HTML/XML expressions and further components. Each component top-level is still JavaScript statements.

There's also an escape hatch to include arbitrary JS expressions inside your JSX expressions, although perhaps we should use it only to include variables and not more complex JS expressions.

In the end, templates are not important, components are. JSX provides just what's necessary to make it convenient to define components in JS.

1 comments

JSX is a Javascript syntax extension.
Yes, and? Did I not differentiate appropriately between JS and JSX expressions?