-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are stores allowed to send actions to other stores? #196
Comments
Where did you read that you can't have stores calling other actions? If it is in our documentation then that needs to be changed. Here is a discussion about the contrary tl;dr:
|
I was basing this on the documentation, or at least my understanding of it. That if a store data depends on another store data it should simply listen to it's trigger with I worry though that this isn't really how the data should be flowing, or it's not really the "right way" somehow as in my mind it was creating lots of crazy data flows in my app that would be hard to pin down. But maybe it's just my understanding of it all is a little confused. So in essence, when a store called |
Yeah, I should probably make it a bit more explicit. The reason you can chain data stores is if you want to do some transformation of the same data. I guess I need to make this more explicit in the documentation.
Again: YES, it's OK. (Don't you worry 'bout a thing 🎶) |
Thank you dude. I suppose I was confused over the documentation, I've been banging my head against a brick wall because of it. An appropriate update might help others out too (unless it's just me being dumb all on my own). Great work on this project! |
Hello.
I'm using Reflux and React for a prototype at work and I'm wondering, is it convention with Reflux for stores to send actions, like I send actions from components, for other stores to listen and respond to? I only ask, as I have a couple of stores that rely on other data from other stores. When I use the
listenTo
method on a store that listens to another store, everything gets quite complex and I've also run into what seems to be circular errors, it just won't run.I'm very used to Backbone and how it handles data. I'm just having a hard time wrapping my head around how Reflux is meant to do things. I've read that I can't have stores calling actions, that should only be in the components, but then I don't really know how to get data from other stores and make sure everything is synced.
The text was updated successfully, but these errors were encountered: