These are chat archives for reflux/refluxjs

22nd
Jul 2015
Robert Chiniquy
@robert-chiniquy
Jul 22 2015 18:12
hey all, quick question for the masses, I'd love any thoughts on this. I would like to make a Store that listens to another Store (which manages a collection) and filters it by a parameter, kind of like an index query, so I can have components that listen to the parameterized store to only get a subselection of the collection store.
Looking through the code, issues, examples, and docs, I don't see any mechanism provided to do this, but it seems natural for stores, also this comment by spoike suggests that it is a good way to use stores: https://github.com/spoike/refluxjs/issues/268#issuecomment-77743922
Specifically this line "However when I chain and join stores, I tend not to set any state. The stores in this case work like glorified map/reduce/filter functions. "
So if I have a store which is like a filter() call, how do I inject into that store specifically what it is filtering by? In filter() it would be a parameter. The only way I can think to do this in Reflux is make my own factory function which my components would call to get the stores to listen to, but this seems extreme.
robert-chiniquy @robert-chiniquy hangs out and hopes to for better ideas on this