You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-15Lines changed: 14 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,8 @@ If something doesn’t work, please [file an issue](https://github.com/facebooki
11
11
## Quick Overview
12
12
13
13
```sh
14
-
npm install -g create-react-app
15
-
16
-
create-react-app my-app
17
-
cd my-app/
14
+
npx create-react-app my-app
15
+
cd my-app
18
16
npm start
19
17
```
20
18
@@ -32,27 +30,22 @@ Just create a project, and you’re good to go.
32
30
33
31
## Getting Started
34
32
35
-
### Installation
36
-
37
-
Install it once globally:
38
-
39
-
```sh
40
-
npm install -g create-react-app
41
-
```
33
+
### Prerequisites
42
34
43
35
**You’ll need to have Node >= 6 on your machine**. You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to easily switch Node versions between different projects.
44
36
45
37
**This tool doesn’t assume a Node backend**. The Node installation is only required for Create React App itself.
46
38
47
39
### Creating an App
48
40
49
-
To create a new app, run:
41
+
To create a new app, run a single command:
50
42
51
43
```sh
52
-
create-react-app my-app
53
-
cd my-app
44
+
npx create-react-app my-app
54
45
```
55
46
47
+
([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))
48
+
56
49
It will create a directory called `my-app` inside the current folder.<br>
57
50
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
58
51
@@ -77,7 +70,13 @@ my-app
77
70
```
78
71
79
72
No configuration or complicated folder structures, just the files you need to build your app.<br>
80
-
Once the installation is done, you can run some commands inside the project folder:
73
+
Once the installation is done, you can open your project folder:
74
+
75
+
```sh
76
+
cd my-app
77
+
```
78
+
79
+
Inside the newly created project, you can run some built-in commands:
0 commit comments