How do components interact in Redux + ReactJS?

I wonder how ReactJS components interact with each other when used in tandem with Redux?

From what I saw in the todoApp tutorial , I created a diagram, as I understand this interaction (this may be completely wrong and that’s why I ask this question):

my personal vision of how to respond + cut back on work

In this diagram, you can see five main sites: Provider, Store, Container, MainComponentand Component.

For simplicity, let this entire system apply an application , which essentially consists of one composite component MainComponentand its children.

Provideris a component that encapsulates both instances Storeand Container.

Container - MainComponent, Redux 'dispatch() () currentState Store.

Store currentState, .

MainComponent, , , Component ().


Redux, connect, selector, reducer dispatch.

selector state, , MainComponent .

connect selector MainComponent Container, Provider MainComponent .

reducer ( ) .

dispatch - , . "" MainComponent. action, Store . reducer, . currentState Store, selector, , , MainComponent, props MainComponent .


, /? ?

!

+4

Source: https://habr.com/ru/post/1619192/


All Articles