react first page

1: preparation, node installation, you can not download Quguan network: http://nodejs.cn/download/

2: Run the command:

npx create-react-app lesson21 start react installation project Remarks Project name can not have capital

 

3: Learn the basics of composition react

       Analyzing react basic usage loop variable

       react-dom Page Operations

       react-script for the project management npm run start command to start the project npm run build packed project

4: Enter lesson21 (cd lesson21)

5: Start Project (npm run start) on the page will see the address is in the localhost: 3000

6: Learn the basic components of the project eh

     index.html is in the public after the start of the project the only single page

     Content development in the src directory is where we often write code, there are css files, js files (components)

7: delete all files in src, and then re-create a index.js file write code inside

8: Write the code in the following index.js

 

9: Save After writing, and then run npm run start page, you can see the effect of the

The first example is completed react

 

Released three original articles · won praise 1 · views 163

Guess you like

Origin blog.csdn.net/visionweii/article/details/103975935