-
Notifications
You must be signed in to change notification settings - Fork 329
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
Throw error when stores are chained in a circular loop #26
Comments
Maybe have set of recipients that received the emit request have been passed to? The first store that receives an emit will create and sign the recipient set with its own instance and then pass onto the next store. If a store finds its 'signature' (instance) on the recipient set, then there's an illegal cycle. |
Instead of a store's instance, have an integer |
Sounds like you have a plan @dashed 👍 ;-) |
The test is basically testing that you can't chain two stores in a circular loop and also that you can't chain the store with itself (which is the tiniest loop possible). Sample:
|
I'm adding this feature for 0.1.6 milestone, together with #27 and #28, so Reflux will be in feature parity with facebook/flux |
Let me know if you want to take this one @dashed. If not I'll probably jump on it when I have the time in the weekend. |
@spoike You can take this one. I won't have time to look at it till next week Tuesday. |
Been too busy with IRL stuff this weekend so I haven't had the time to look into this. Anyone is free to take a gander at it... if nobody does then I'll notify if I start working on this. |
I have a solution now. Need to integrate with Reflux.all in #28 and it'll be done. |
Story
Do some listener dependency tracking on actions and stores to make sure that developers don't accidentally do circular dependency and have an indication where it went wrong.
The text was updated successfully, but these errors were encountered: