Article directory
1. Install create-react-app scaffolding
Open cmd, execute the command npm i -g create-react-app, and install the create-react-app scaffolding
2. Create a React project named react-demo
Excuting an order
create-react-app react-demo
3. Project created successfully
4. Use vscode to open the project and run it
Enter npm start to run the project
5. The project runs successfully
node_modules: stores some third-party package files that the project depends on
public: static resource folder
favicon.ico: navigation icon
index.html: html template for the project homepage
logo192.png&logo512.png: two logo images
manifest.json: application packaging configuration file, a json file describing our application on the mobile phone
robots.txt: crawler protocol file
src: source code folder
App.css: App component style
App.js: App component
App.test.js: Automated test file, used to App for testing
index.css: global style
index.js: entry file, all components used will be loaded through index.js
logo.svg: A logo file of react. The sug file is pure XML, which ensures that the image is not distorted when zooming in and out
reportWebVitals.js: Imports a third party of web-vitals Library, used to check the performance of applications
setupTests.js: Import matchers from Jest-dom and use them when testing
Other documents
.gitignore: a file in git, where you can configure files that you do not want to submit to the repository
package-lock.json: the version number of the project installation package
package.json: stores some dependencies and instructions of react
README.md: an introduction file of the project, written using markdown markup language, commonly used in projects on open source code websites such as github .md file for introduction