EN
React - create new app
13 points
In this short article, we would like to show how in simple way create React application from command line using npm
.
Quick solution (run the command):
xxxxxxxxxx
1
npx create-react-app my-new-app
Where: my-new-app
is the project name and directory that will be created.
Note: be sure the React is installed or install it with
npm install -g react
.
After application is created, we can run it using:
xxxxxxxxxx
1
# change directory to our new application
2
cd my-new-app
3
4
# start application with npm
5
npm start
We can use yarn package manager, too:
xxxxxxxxxx
1
yarn create react-app my-new-app
2
3
cd my-new-app
4
yarn start