These are chat archives for reflux/refluxjs

Jul 2016
Avinash Srivastava
Jul 18 2016 10:50
I have two components and one store
how do I make the two components listen to the same store
if I use create store in both the components it will create a new instance of the store
not useful
is there any another way
devin ivy
Jul 18 2016 12:38
hi @avinashdaiict. as you're hinting at, you should make a store that is shared by your components.
Bryan Grezeszak
Jul 18 2016 16:03
@avinashdaiict - if you're using the ES6 API then you would just attach the store to both components, i.e. do = MyStoreClass; in the constructor of both components. It won't make a second instance of the store, only one singleton instance of the store will be made and both components will listen to/update off of it.