This article has participated in the third phase of the “High production” track at the Digger Creators Camp. For more details, check out the third phase of the Digger Project | Creators Camp to “write” personal impact.

Actually have come into contact with the React when I was 16 years, the time also just started, after many years, has not come into contact with the related work on the business, unconsciously, front end of the day began to gradient, see a lot of recruitment demands are on will React, how also get familiar with the use of two three framework, don’t let your next job may be difficult to ~

As usual, read the official document first:

Tutorial: www.runoob.com/react/react…

Documents: caibaojian.com/react/

Introduction: React is a JS library developed by Facebook. It is a declarative, componentized JavaScript library that is used to build user interface. Generally speaking, React divides the interface into reusable components, which are introduced when needed to decouple the interface and make each other connected. Make the efficiency and performance greatly improved.

Characteristics of the React

  • 1. Declarative design −React adopts the declarative paradigm, which can easily describe applications.
  • −React minimizes interactions with the DOM by simulating the DOM.
  • 3. Flexibility −React works well with known libraries or frameworks.
  • 4.JSX − JSX is an extension of the JavaScript syntax. React development does not necessarily use JSX, but we recommend it.
  • 5. Components — Components are built with React, which makes the code more easily reused and can be well applied in the development of large projects.
  • 6. One-way response data flow − React implements one-way response data flow, which reduces duplicate code, which is why it is simpler than traditional data binding.

In the spirit of learning, the work that needs to be prepared before building the React development environment is started:

1: Install node.js and view the version number

2: Install CNPM instead of NPM and view the version

3: yarn, view the version number

For children’s shoes that do not install YARN, run the installation command NPM i-g yarn to view the official document

I won’t go into detail on the above three steps, but after the preparation is complete

4: Install scaffolding

cnpm  install -g  create-react-app
Copy the code

5: Create an empty directory on drive D to store the project

6: Enter the folder and create the project

create-react-app reactdemo
Copy the code

Waiting to generate our project (may take a few minutes if the network is slow)

And you can see that this project is initialized on disk D

7: CD to the just generated project file, run the project

CD reactdemo Use yarn start or NPM startCopy the code

The react environment is installed

Learning React from scratch – building the development environment is complete, suddenly feel, is it the same as vUE operation steps?