You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two store and two components that use the stores (one store per component). The use case implies navigating from one component to the other through a link. In the components I have the following line after getting a WARNING about not calling "setState" when component is unmounted (looking through this forum gave me the answer for that):
My question is in regards to the unmounted store still listening to Actions. So I wanted a single action called loadData to be listened to in both stores. Each store does a different thing based on that action. This action is called by the components on their respective componentDidMount methods. The thing is, when I navigate from one component to the other, when the action loadData gets called, both stores listen to it instead of only the one that was just attached to the component that in turned triggered loadData.
I suppose my question is, am I not supposed to use generic actions like that? I assumed if the stores did not have any mounted components that used them, they wouldn't listen to the actions.
Thank you.
The text was updated successfully, but these errors were encountered:
I have two store and two components that use the stores (one store per component). The use case implies navigating from one component to the other through a link. In the components I have the following line after getting a WARNING about not calling "setState" when component is unmounted (looking through this forum gave me the answer for that):
componentWillUnmount() { Reflux.Component.prototype.componentWillUnmount.call(this); ... }
My question is in regards to the unmounted store still listening to Actions. So I wanted a single action called
loadData
to be listened to in both stores. Each store does a different thing based on that action. This action is called by the components on their respectivecomponentDidMount
methods. The thing is, when I navigate from one component to the other, when the action loadData gets called, both stores listen to it instead of only the one that was just attached to the component that in turned triggeredloadData
.I suppose my question is, am I not supposed to use generic actions like that? I assumed if the stores did not have any mounted components that used them, they wouldn't listen to the actions.
Thank you.
The text was updated successfully, but these errors were encountered: