Inserted other updated way of installation of CRA (#25162)
* Inserted other updated way of installation of CRA Now, the documentation of react showing the example "npx create-react-app my-app" because it is made easy from npm 5.2+. * Bifurcation of different methods
This commit is contained in:
committed by
The Coding Aviator
parent
56e8e37487
commit
bc1211680e
@ -10,7 +10,7 @@ Everything in React is a component.
|
|||||||
But before that we need to make sure to have node.js and npm installed in the computer. Optionally we can use CRA(Create React App) which is a tool built by developers at Facebook to help you build React applications. It saves you from time-consuming setup and configuration. You simply run one command and create-react-app sets up the tools you need to start your React project.
|
But before that we need to make sure to have node.js and npm installed in the computer. Optionally we can use CRA(Create React App) which is a tool built by developers at Facebook to help you build React applications. It saves you from time-consuming setup and configuration. You simply run one command and create-react-app sets up the tools you need to start your React project.
|
||||||
|
|
||||||
We can install it through the following commands
|
We can install it through the following commands
|
||||||
```
|
```bash
|
||||||
npm install -g create-react-app
|
npm install -g create-react-app
|
||||||
|
|
||||||
create-react-app my-app
|
create-react-app my-app
|
||||||
@ -19,6 +19,13 @@ cd my-app
|
|||||||
npm start
|
npm start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or, on npm 5.2+ with Node.js 6.0+,
|
||||||
|
```bash
|
||||||
|
npx create-react-app my-app
|
||||||
|
cd my-app
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
The command line should give you an output where you can find the application in the browser. The default should be localhost:8080. If you are only using IE or Edge on your Windows machine, I can recommend you to install Chrome as well to access the developer environment and the React Developer Tools which are available as Chrome extension.
|
The command line should give you an output where you can find the application in the browser. The default should be localhost:8080. If you are only using IE or Edge on your Windows machine, I can recommend you to install Chrome as well to access the developer environment and the React Developer Tools which are available as Chrome extension.
|
||||||
|
|
||||||
** If you don't use Chrome, there are extensions that let you use Chrome extensions. **
|
** If you don't use Chrome, there are extensions that let you use Chrome extensions. **
|
||||||
|
Reference in New Issue
Block a user