Babel is a javascript compiler.
It is able to take next generation javascript like: ES6/ES7/ES8 and compiles it to a version of javascript that every browser can understand. This includes converting JSX to plain old javascript code.
If we head over to the section
"try it out"
, we get two white windows where we can compare side by side our new generation JSX code to the converted old version of javascript code that can be read by every browser even good old internet explorer ๐.
- write this line of code in the left section of
"try it out"
<h1>React World </h1>, dest ); </script>
- the left section has the modern JSX code and the right section is the old javascript code.
If you're wondering as to what exactly is JSX?
- JSX stands for JavaScript XML. JSX allows us to write HTML in React. JSX makes it easier to write and add HTML in React.
ย