JSX is not for local file demos

Sorin
Code sections
Published in
1 min readFeb 5, 2020

--

React also supports JSX (the syntax that imho is what really makes it great), but when you reference separate text/babel script files to perform in-browser preprocessing — assuming that you are building a demo or a PoC app — it won’t work locally from index.html anymore, and you’d need to actually host everything in a localhost Web server.

That’s an(other) difference comparing React and Vue, one that beginners may easily get to fight against (and lose.)

* JSX is almost a must with React, while .vue single files are kinda optional.

--

--

Sorin
Code sections

Software Developer • Rust, Swift, WPF, Web • MacBook enthusiast • fashion design • EDM • absurdism • writing from Cluj