KarlPurk / redux-decorators

A ridiculously good syntax for working with Redux using decorators in ES7 / TypeScript. Currently limited to Angular 2 but could potentially be used elsewhere.
MIT License
90 stars 10 forks source link

Using multiple stores? #5

Closed gaiottino closed 8 years ago

gaiottino commented 8 years ago

Hi,

I'm really liking the idea of these decorators. But I'm curious it it would be possible to use multiple stores? I.e. in a larger app, one to hold the state for say the breadcrumbs, and another to hold the state of the page itself. How could I go about achieving this?

Thanks

spicywhitefish commented 8 years ago

From the redux docs:

It’s important to note that you’ll only have a single store in a Redux application. When you want to split your data handling logic, you’ll use reducer composition instead of many stores.

Redux's imposed restriction of a single store is one of the key differences between it and Flux.

KarlPurk commented 8 years ago

Multiple stores aren't supported due to the single store restriction mentioned above.