I am new to React and Flux. I am trying to build a subscription like system. With many to many relation ship but i am confused on how to implement the callback:
The scenario:
User a, b, c subscribe to item 1.
User a, b, d subscribe to item 2.
User b, c, d subscribe to item 3.
the items are infinite, and the users are also infinite.
So in this case, if there is some attribute in item 1 changed, I want to emit change to the its subscriber which is a,b,c.
Due to the fact the items are infinite, I can't manually create a that number of callbacks.
I imagine there would be an array of callback that bind to the subscribers. And only have 1 emit change, then find the callback index, and perform the callback to its subscribers.
Could someone point me to the correct direction.
Thanks,