Understanding react
JavaScript library used to build the user interface
features:
1. declarative programming
2. All of the component (UI component may be cut into a number of independent, reusable components, so that you only need to focus on building each of the individual component )
3. [powerful ecosystem a learning, write anywhere]
single data stream from top to bottom 4.
the main push jsx syntax
6. functional programming
About declarative programming and imperative programming
First get to know about the terminal windows system
$ Windows + r (windows of the keys on the keyboard icon) to bring up the terminal, type cmd, click OK, and then tune out the terminal
But this terminal more difficult to use, the development of some commonly used dos command:
Change your disk, create a file, folder, clear screen, etc., various commands are not supported
Recommend a new terminal cmder , more powerful features, supports a variety of dos command on the mac windows system
cmder available under dos command:
$ Disk symbol: // switch letter
$ Ls or dir // View catalog
$ Cd file enter a file name //
$ Cd .. // return to the previous step
$ Mkdir folder name // Create a folder
$ Touch filename // create a file
$ Cls clear screen
$ Pwd // View catalog
After all the study are based on official scaffolding on (es5 believe very basic grammar, then the god of the major sites can be found)
Scaffolding building official (on how to build the scaffolding, reference webpack official tutorial)
1. Install node directly to the official download and install, the installation is complete after the terminal performs
$ node -v
$ npm -v2. As npm slower, so instead of using the yarn npm mounted yarn
$ I npm yarn -g3. npx directly pulling official scaffold template, npx a node comes to avoid global installation module
$ npx create-react-app project_name4. The overall installation mode
$ yarn add create-react-app global5. Create a project
$ create-react-app project_name
Press Enter after the desktop to create a project called kugou of raect
Moving map presentation
Created, then open vscode
Project Directory
Startup project
README.md open the file, you can see the project start command
Then the next project root directory
npm start or yarn start to start the project