-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathReact_notes
More file actions
32 lines (20 loc) · 974 Bytes
/
React_notes
File metadata and controls
32 lines (20 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Creating a new React App:
- Install create-react-app from the Facebook repository. It creates and setups a bunch of scripts needed to run React smoothly in browsers.
If not installed yet, install npm install -g create-react-app
- In the directory where you want to locate your React app. This will install React, react-dom and react-scripts (Babble, webpack, webpack dev server, etc)
On terminal create-react-app <nameofapp>
- Commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd photowall
npm start
- Under <appname> in the src folder, dlete all files but index.js
- Inside index.js, delete all code. This will be our main entry file.