Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
xutopia
· 9y ago · 0 comments
There is something I do not understand. Why does `<div>` not create a syntax error in the Javascript examples? Is there a pre-processor?
Comments
[–]
Hnus
9y ago
Take a look here
https://facebook.github.io/react/docs/react-without-jsx.html
[–]
SlyShy
9y ago
Yes, JSX considers that valid syntax.
[–]
developerdanny
9y ago
it uses JSX which allows you to use HTML in JS :-)
[–]
ksherlock
9y ago
babel, typescript, and bublé can convert jsx into javascript.
Better HN