fluttercommunity / redux.dart

Redux for Dart
https://pub.dev/packages/redux
MIT License
515 stars 61 forks source link

Creating a store with multiple reducers #43

Closed dabit3 closed 5 years ago

dabit3 commented 5 years ago

I'm curious as to how one would go about creating a store with multiple reducers when using the combineReducers method when calling new Store?

For instance, if I wanted to pass the entire store down at a top level & have the store available anywhere in my app with all of the reducers.

stafyniaksacha commented 5 years ago

Hey @dabit3 you can take a look at the brianegan/flutter_architecture_samples/.../redux repository

I think this is what you are looking for: https://github.com/brianegan/flutter_architecture_samples/blob/master/example/redux/lib/reducers/app_state_reducer.dart

jordyvandomselaar commented 5 years ago

@stafyniaksacha That page doesn't exist :(

brianegan commented 5 years ago

Heya, we have some docs that cover this topic: https://github.com/johnpryan/redux.dart/blob/master/doc/combine_reducers.md