To transform JSX to Javascript syntax, we need @babel/preset-react
. For more details, read this doc: Introducing the New JSX Transform.
To compact react
and react-dom
dependencies into a single bundle.js
for browser, we need Webpack
and @babel/preset-env
. For more details, read this turorial: How to set up & deploy your React app from scratch using Webpack and Babel.