4

In Flux pattern, is it ok for a store to declare multiple events for a view to listen to? E.g. listChanged, selectedListItemChanged, etc. At first glance it seems legit to me (either this or passing additional parameter in a change event) as it doesn't break the flow and just adds few down arrows from store to view.

I've ommited "React" on purpose, because I'm looking for a generic pattern, not bound to concrete rendering library. And having one stateChanged event makes rendering process very complex without ReactJs magic.

leppie
  • 115,091
  • 17
  • 196
  • 297
Dmitry Golubets
  • 570
  • 5
  • 13
  • Well it adds a ton of additional complexity for you to manage by hand which could be automated for you with virtually zero cost, why would you pass that? Even if you have something against react, you can just use some other virtual-dom library – Esailija Dec 17 '14 at 18:42
  • I have nothing against React, but there are legacy ui controls and third party components (like Goole Maps) that I can't rewrite but want to fit them in the architecture. – Dmitry Golubets Dec 18 '14 at 09:01
  • It's still possible to use React with other libraries, even though I guess you can argue that it doesn't "fit" well enough: http://facebook.github.io/react/tips/use-react-with-other-libraries.html – Hannes Johansson Jul 02 '15 at 09:37

0 Answers0