As the saying goes, “A good memory is better than a bad pen”. Today, adhering to the attitude of convenient review in the later stage, I sorted out a list of basic knowledge points of Redux and presented it in the way of mind map, which is convenient for us to check and fill up the gaps together.

1. Initialization

Two, three principles

Third, based

Four, API

4.1 createStore

4.2 Store

4.3 combineReducers

4.4 applyMiddleware

4.5 bindActionCreators

4.6 compose

Async Action create function

React

Seven,

In the process of sorting out these basic knowledge points, there are the following feelings, not necessarily correct, share with you to discuss:

  1. Redux is for state management, which really makes the whole project clearer;
  2. It’s much easier to implement things that have side effects with middleware, but understand what middleware does before you use it. For example, we often use Redux-Thunk, which allows Dispatch to accept a function as an argument (in principle, it can only accept an object as an argument). In the function, the state is updated after the asynchronous task is completed.
  3. You should build your own project template that you can use every time you start a new project.

1. If you think this article is good, share and like it so that more people can see it

2. Welcome to pay attention to the front end line and surface of the public account and open the road of programming redemption.