Redux unified management Detailed data

1. What is the Redux

Redux is an important part of React ecology. Many people say, you can not apply this simple tool. But I personally think that the use of small and medium sized applications, you can make more standardized file structure, the code more readable. React proposed as display assembly and the container assembly separated from the idea of the degree of coupling is reduced between React and Redux.
Here Insert Picture Description
Redux is a popular JavaScript framework, providing a predictable state of the container application. Redux framework based on a simplified version of Flux, Flux is a framework developed by Facebook. In the MVC standard framework, data can flow bidirectionally between the storage and the UI component, and Redux restricted data flow in one direction only. See below:

image description

In Redux, all data (for example state) is stored in a referred store→ a container in only one application. storeIt is essentially a state tree, save the state of all objects. Any UI components directly from the storestate to access a particular object. To change the status by local or remote components, you need to distribute a action. Distribution here means that information is sent to the executable store. When a storereceived one action, this willaction

Guess you like

Origin blog.csdn.net/p445098355/article/details/105218071