0

When using React and following Flux, what is the best approach for managing state in stores, a single store that rules them all or at the other end of the spectrum a store per entity?

Implementation is intended for an enterprise eccommerce app, so pretty big and complicated!

  • Depends really. I have answered similar question [here](http://stackoverflow.com/a/33111552/5358807). Hope this helps. – wintvelt Nov 10 '15 at 17:13

1 Answers1

0

I'm not sure if your requirements to use #flux are already set, but over some time "Redux turned out to be the better Flux". If you haven't started yet, have a look on Redux.

Regarding Stores, they have a clear statement here:

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.

So they have a good receipe to solve a problem you might be facing right now when doing classic Flux.

But also, sorry for not answering your question ;)

thmshd
  • 5,729
  • 3
  • 39
  • 67