Because the system is complex (for example, thirty pages), it shouldn’t be possible to store all the states in one store, right?
I think that in redux’s thinking, it is recommended to use one store for each app. Unless some states are completely independent, there will be no connection. Of course, multiple providers can be used, but this can also be regarded as multiple apps. Redux uses reducer tree to divide the structure, and use selector in each container to select the required store. Don’t worry too much about performance issues. react-redux’s connect will also help you optimize most unnecessary rendering, which is generally fine.
You can use connect on each routing page to obtain the required store
I think that in redux’s thinking, it is recommended to use one store for each app. Unless some states are completely independent, there will be no connection. Of course, multiple providers can be used, but this can also be regarded as multiple apps. Redux uses reducer tree to divide the structure, and use selector in each container to select the required store. Don’t worry too much about performance issues. react-redux’s connect will also help you optimize most unnecessary rendering, which is generally fine.
I don’t think so, but redux limits one and can only have one store.
Create store