Is it Ok for a store to create an action to another store?
My data in store A
always changing frequently, and i want to pass the data in store A
to store B
every time that my data in store A
gets an update.
So I've made a listener in store A
, on data change that's calling an handle function which "fire" an Action dataChange(this.data)
(in store A
) with the current data and store B gets the new data by onDataChange(data)
every time the my data changed in store A
.
So it's working, but i want to know if this is how i supposed to work with the data flow or there is more elegant way to do it.