You should start your project with Create React App (CRA).

It's a React app initializer made by the React team. It makes all the setup for you (including Babel and Webpack configurations) and add some really nice features to your development environment.


If you don't want to use CRA, you will need to install:

  • babel-core
  • babel-preset-env
  • babel-preset-react

Then create a file .babelrc in the root of your project containing:

{ "presets": ["env", "react"] }

Then install and configure Webpack to run the Babel transforms.

(Or you could also run Babel manually with babel-cli).


The React documentation slightly addresses the Babel setup problem here.

They also suggest to use CRA here.

Answer from GG. on Stack Overflow
🌐
Babel
babeljs.io › presets › @babel/preset-react › transform-react-jsx
@babel/plugin-transform-react-jsx · Babel
This plugin generates production-ready JS code. If you are developing a React app in a development environment, please use @babel/plugin-transform-react-jsx-development for a better debugging experience.
🌐
Babel
babeljs.io › repl
Babel
Skip to main content
Top answer
1 of 4
2

You should start your project with Create React App (CRA).

It's a React app initializer made by the React team. It makes all the setup for you (including Babel and Webpack configurations) and add some really nice features to your development environment.


If you don't want to use CRA, you will need to install:

  • babel-core
  • babel-preset-env
  • babel-preset-react

Then create a file .babelrc in the root of your project containing:

{ "presets": ["env", "react"] }

Then install and configure Webpack to run the Babel transforms.

(Or you could also run Babel manually with babel-cli).


The React documentation slightly addresses the Babel setup problem here.

They also suggest to use CRA here.

2 of 4
2

Ah, I found an answer in a Beginner's Guide to React at https://egghead.io/courses/the-beginner-s-guide-to-reactjs.

Apparently there is a standalone Babel compiler you can just link to in the head of the document, along with the links to ReactJS and it "does the right thing". Yay! Here are the links I'm using:

<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/babel.min.js"></script>

In the script tag that contains the ReactJS and JSX code, you must use type=text/babel:

<script type="text/babel">...</script>

I hope this helps other people starting out with React and JSX.

I'm guessing I'll eventually need to learn how to use NPM, NPX, Node, Webpack, and Babel (and possibly other tools) to run production ReactJS code, but for now I'm hoping this will allow me to learn ReactJS without having to worry about all that.

🌐
Medium
medium.com › @atacanymc › demystifying-jsx-and-babel-in-react-development-e520746f102c
Demystifying JSX and Babel in React Development | by Ata Can Yaymacı | Medium
January 13, 2024 - Expressiveness: JSX allows embedding ... syntax. ... Babel is a JavaScript compiler that translates modern JavaScript code (including JSX) into an older version that is widely supported by browsers and platforms....
🌐
GeeksforGeeks
geeksforgeeks.org › reactjs › reactjs-babel-introduction
ReactJS Babel Introduction - GeeksforGeeks
ReactJS Babel is a JavaScript compiler that converts JSX and modern JavaScript syntax into browser-compatible code, allowing React applications to run across different environments.
Published   June 25, 2026
Find elsewhere
🌐
React
legacy.reactjs.org › blog › 2020 › 09 › 22 › introducing-the-new-jsx-transform.html
Introducing the New JSX Transform – React Blog
September 22, 2020 - Together with the React 17 release, we’ve wanted to make a few improvements to the JSX transform, but we didn’t want to break existing setups. This is why we worked with Babel to offer a new, rewritten version of the JSX transform for people who would like to upgrade.
🌐
npm
npmjs.com › package › @babel › plugin-transform-react-jsx-development
@babel/plugin-transform-react-jsx-development - npm
May 25, 2026 - Turn JSX into React function calls in development. Latest version: 7.27.1, last published: 7 months ago. Start using @babel/plugin-transform-react-jsx-development in your project by running `npm i @babel/plugin-transform-react-jsx-development`. There are 32 other projects in the npm registry using @babel/plugin-transform-react-jsx-development.
      » npm install @babel/plugin-transform-react-jsx-development
    
Published   Apr 30, 2025
Version   7.27.1
🌐
Wikipedia
en.wikipedia.org › wiki › Babel_(transcompiler)
Babel (transcompiler) - Wikipedia
July 20, 2025 - Babel plugins transform syntax that is not widely supported into a backward-compatible version. For example, arrow functions, which are specified in ES6, are converted into regular function declarations. Non-standard JavaScript syntax such as JSX can also be transformed.
🌐
npm
npmjs.com › package › babel-plugin-jsx-control-statements
babel-plugin-jsx-control-statements - npm
JSX-Control-Statements only adds the syntactic sugar to write conditionals as component, while it transforms this "component" to a pure JS expression. See Alternative Solutions for a more detailed comparison and pure JS solutions. As a prerequisite you need to have Babel installed and configured in your project.
      » npm install babel-plugin-jsx-control-statements
    
Published   Jan 11, 2022
Version   4.1.2
🌐
GitHub
github.com › hrgdavor › babel-plugin-jsx-simple
GitHub - hrgdavor/babel-plugin-jsx-simple: Babel plugin for simple JSX to JS transformation. · GitHub
Babel plugin for simple JSX to JS transformation. Contribute to hrgdavor/babel-plugin-jsx-simple development by creating an account on GitHub.
Author   hrgdavor
🌐
Babel
babeljs.io › docs › babel-plugin-syntax-jsx
@babel/plugin-syntax-jsx · Babel
Using this plugin directly only enables Babel to parse this syntax. If you want to transform JSX syntax then use the transform-react-jsx plugin or react preset to both parse and transform this syntax.
🌐
Habilelabs
habilelabs.io › services › aws services › generative ai › about › contact us
Introducing New JSX Transform- All You Should Know About!
HabileLabs is a trusted global partner for Cloud, Data & AI solutions, helping enterprises modernize platforms, scale securely, drive measurable business growth
Call   9828247415
Address   Sec-93 Agarwal Farm, Mansarovar, 302020, Jaipur
🌐
DEV Community
dev.to › rowsanali › understanding-jsx-compilation-the-role-of-babel-in-react-ief
Understanding JSX Compilation: The Role of Babel in React - DEV Community
November 8, 2023 - It is a syntax extension for JavaScript ... JavaScript. ... Babel is a JavaScript compiler that converts edge JavaScript (like JSX) into a backward-compatible version for current and older browsers or environments....
🌐
npm
npmjs.com › package › @babel › plugin-transform-react-jsx
@babel/plugin-transform-react-jsx - npm
January 12, 2026 - Turn JSX into React function calls. Latest version: 7.28.6, last published: 3 months ago. Start using @babel/plugin-transform-react-jsx in your project by running `npm i @babel/plugin-transform-react-jsx`. There are 1321 other projects in the npm registry using @babel/plugin-transform-react-jsx.
      » npm install @babel/plugin-transform-react-jsx
    
Published   Jan 12, 2026
Version   7.28.6
🌐
Medium
medium.com › from-the-scratch › reactjs-introduction-with-and-without-jsx-and-babel-for-beginners-57a5b6a4eb08
ReactJS Intro: With and without JSX and Babel for beginners | by Skrew Everything | From The Scratch | Medium
March 15, 2018 - That means that before the file reaches a web browser, a JSX compiler will translate any JSX into regular JavaScript. Babel is a tool that helps you write code in the latest version of JavaScript.
🌐
Medium
medium.com › @qrizan › babel-and-jsx-understanding-the-compilation-pipeline-8911e74e2c95
Babel and JSX: Understanding the Compilation Pipeline | by rizan | Medium
December 19, 2024 - When building modern web applications, JSX and Babel play critical roles in transforming our code into something browsers can understand. JSX, or JavaScript XML, allows us to write HTML-like syntax directly inside JavaScript, making UI development ...
🌐
Heuristic42
heuristic42.com › blog › 58 › calling-babel-from-django-for-reactjsx
Calling Babel from Django for React+JSX - Blog - Heuristic42
May 29, 2023 - Now the question is, how can I get Django to call babel. I found that django-compressor actually supports a COMPRESS_PRECOMPILERS setting that could add a transpile step to each of my sources. For example, from SO I got this to run: COMPRESS_PRECOMPILERS = ( ('text/jsx', '< "{infile}" babel --plugins @babel/plugin-transform-react-jsx-source --presets @babel/preset-env,@babel/preset-react > "{outfile}"'), )