react /create-react-app

Set up a modern web app by running one command.

★ 103,230⑂ 26,859👁 1,863⑃ 4,435● 8,435▤ 83◈ 570
JavaScriptMITCreated 2016-07-17create-react-app.dev/
103,230
stars
+0
26,859
forks
1,863
watchers
4,435
prs
8,435
issues
83
releases
570
discussions

README

Create React App  

 [!CAUTION]

  Deprecated

 Create React App was one of the key tools for getting a React project up-and-running in 2017-2021, it is now in long-term stasis and we recommend that you migrate to one of React frameworks documented on Start a New React Project.

 If you are following a tutorial to learn React, there is still value in continuing your tutorial, but we do not recommend starting production apps based on Create React App.



Create React apps with no build configuration.

- Creating an App – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.

Create React App works on macOS, Windows, and Linux.
If something doesn’t work, please file an issue.
If you have questions or need help, please ask in GitHub Discussions.

 Quick Overview

sh
npx create-react-app my-app
cd my-app
npm start


If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.

_(npx comes with npm 5.2+ and higher, see instructions for older npm versions)_

Then open http://localhost:3000/ to see your app.
When you’re ready to deploy to production, create a minified bundle with npm run build.





 Get Started Immediately

You don’t need to install or configure tools like webpack or Babel.
They are preconfigured and hidden so that you can focus on the code.

Create a project, and you’re good to go.

 Creating an App

You’ll need to have Node 14.0.0 or later version on your local development machine (but it’s not required on the server). We recommend using the latest LTS version. You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

To create a new app, you may choose one of the following methods:

 npx

sh
npx create-react-app my-app


_(npx is a package runner tool that comes with npm 5.2+ and higher, see instructions for older npm versions)_

 npm

sh
npm init react-app my-app


_npm init  is available in npm 6+_

 Yarn

sh
yarn create react-app my-app


_yarn create  is available in Yarn 0.25+_

It will create a directory called my-app inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:


my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    └── serviceWorker.js
    └── setupTests.js


No configuration or complicated folder structures, only the files you need to build your app.
Once the installation is done, you can open your project folder:

sh
cd my-app


Inside the newly created project, you can run some built-in commands:

 npm start or yarn start

Runs the app in development mo

Top issues

Discussions

Latest release

v5.0.1 v5.0.1 2022-04-12
5.0.1 (2022-04-12)

Create React App 5.0.1 is a maintenance release that improves compatibility with React 18. We've also updated our templates to use createRoot and relaxed our check for older versions of Create React App.

 Migrating from 5.0.0 to 5.0.1

Inside any created project that has not been ejected, run:


npm install --save --save-exact [email protected]


or


yarn add --exact [email protected]


 :bug: Bug Fix

- react-scripts
  - 12245 fix: webpack noise printed only if error or warning (@Andrew47)
- create-react-app
  - 11915 Warn when not using the la

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON