Hi channel, I am wonder which is best practice, to have a unique store for the entire app or different stores for each activity(in case of android)?
p
Patrick Jackson
12/10/2019, 1:47 AM
One global store for the entire app is recommended practice for redux app. There are other archs with multiple stores, such as 'flux' for the web.
g
Guillermo Robles
12/10/2019, 7:05 AM
I see. Then, you use a root reducer who is responsible to reduce all sub states.
But, how the global state is reduced by reducing its sub states individually or by folding?
r
Robert Jaros
12/10/2019, 8:21 AM
I'm using multiple stores in a large web application.
Robert Jaros
12/10/2019, 8:21 AM
IMHO it would be too complex to keep the entire state in a single store.
g
Guillermo Robles
12/10/2019, 3:02 PM
Yes, I agree @Robert Jaros . In a big application is not really scalable. I am following a similar arch than redux kotlin but with multiple stores.