React builds DvaJS development environment

Then we will start to use DvaJS later.
It is an excellent lightweight application framework for React.
It has been widely used by many companies.

He is a solution of redux and redux-saga that can simplify operations
and also has built-in react-router routing and fetch network requests

First of all, it is not difficult to learn because the Api itself is relatively small, and it is also very convenient for redux.
As for the origin of his name, the character of Overwatch is called Dav.
insert image description here
Then let’s build an environment to have a look.

We directly open the terminal and enter

npm install dva-cli -g

Introduce dva globally
and our dependencies come in.
insert image description here
Then we right-click the command line tool to open it as an administrator
insert image description here
and enter it on the command line

dva -v

We can view our current version of dva.
insert image description here
We create a directory locally
insert image description here
and open the terminal as an administrator to enter

dva new 项目名称

If the project name is in English, I don’t need to emphasize it.
I use it here

dva new dva-quickstart

Then the console appears as shown in the figure below, just enter y and press Enter, and wait
insert image description here
for the command to be executed.
insert image description here
Here we can see that he has created a project for us.
insert image description here
The whole is a relatively standard project environment
insert image description here
. Then we still use the package first. The commands in json let him run first
insert image description here

npm run start

insert image description here
After we run it, we will find that there is an error message on it.
insert image description here
This is indeed a version, and the error report can be ignored.

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/131498016