-
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
A join*any option #170
Comments
Yeah, I've been doing this manually as well. I don't know if joins is the right pattern for this since it will yield undefined/null values. Maybe there is a better pattern for this? I'd love (:heart:) to hear other ideas for this "remapping" use case. |
Can't be a joinCombine? That could be really useful |
I need the feature and i can try to make a pull request, but i need to know if that would be ok |
@gabadi It's OK. 👍 |
till now i didn't arrive to something that is good enough. If i've something i'll do a pull request |
I just implemented This way, the store will be listening to the action directly (instead of listening to other stores). Now, in your store’s action handler, it can ask Reflux that the action be delivered to some other store (synchronously) first. Hope you (or anyone who stumbles upon this issue) find it useful! |
So is this one abandoned? What solution did you choose? Just introduced baconjs into the application? |
There's this case where I have an array of contacts in one store, and an array of ids in another store (selected contacts). Then there's a third store that merges the two, adding
isSelected
to the contacts whose id exists in the second store.Now with joins, this becomes trivial. However, joins require all event sources to fire before firing the handler. If I only changed the second store, it won't fire the join on the third store. The effect is that views depending on the third store will not update because the first store didn't update anything yet.
Is there a way to fire the handler when any of the event sources trigger? I once did this by manually listening to changes, caching the data, and firing a remapper function. But it would be nice if this was baked into Reflux.
The text was updated successfully, but these errors were encountered: