Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including babel-preset-react with all npm packages installed. Try it out:

var babelPresetReact = require("babel-preset-react")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

babel-preset-react v6.24.1

Babel preset for all React plugins.


Babel preset for all React plugins.

This preset includes the following plugins/presets:


You can also check out the React Getting Started page

For more info, check out the setup page on the cli and the usage docs.

Install the CLI and this preset

npm install --save-dev babel-cli babel-preset-react

Make a .babelrc config file with the preset

echo '{ "presets": ["react"] }' > .babelrc

Create a file to run on

echo '<h1>Hello, world!</h1>' > index.js

View the output

./node_modules/.bin/babel index.js


Via .babelrc (Recommended)


  "presets": ["react"]


babel script.js --presets react 

Via Node API

require("babel-core").transform("code", {
  presets: ["react"]
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free