Process diagram of react Redux

Time:2022-1-4

aboutReact-ReduxModify the of the target componentpropsLogic of:

  1. stayconnectAdvancedIn the component, the current component will listenstoreChanges, oncestoreIf there is a change, the corresponding listening method in the component will be called.

  2. This method will take the calculatedpropsSave tothis.selector.propsIn a temporary variable, and then invokesetStateForcere-render

  3. Then inrenderMethodthis.selector.propsAspropsPass to target component

  4. as forrenderCall in step 2setStateWhen you’re ready, you’ll putconnectAdvancedComponent marked asdirty, it will cause all the following nodesrender(regardless of the impact of shouldcomponentupdate).

Process diagram of react Redux