I have my own opiniated way on how to use React and am building my own framework, inspired by Om. I am implementing something a bit similar to the Flux architecture, with stores that can update themselves on some events.
What I am not sure to understand is why in the Flux architecture do we need store dependencies?
Stores aren't supposed to be self-contained data holders for a given bounded context, like we do with CQRS architectures?
In an evented system, 2 CQRS components could end up holding the same data. Do we express store dependencies to avoid holding duplicate data in stores?
Can someone come up with some very concrete use cases where store dependencies are needed and where the problem can hardly be solved in any other way? I can't find any myself.
I've finally built an application with something akin to Flux stores without any dependency.
Recently Dan Abramov created a framework (Redux) that highlights flux stores composability, without the need of any store dependency or waitFor
, and I share most of his ideas