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 am connecting to redux using connect() and within the targetFunction I want to dispatch an action. I see the action being dispatched in the Redux Inspector Chrome extension, but the state selector is not being called. When I dispatch the action OUTSIDE of the targetFunction, everything works as expected.
I found several examples and tutorials doing what I did in the plunker. I can only assume they are not publishing non-working examples.. So, is this a bug in ngRedux or not supported at all? Is it considered bad practice dispatching actions from the targetFunction?
The text was updated successfully, but these errors were encountered:
What I found is that the targetFunction will be called once when the controller is initialized. The dispatching actions doesn't work. However, later, if you change the state and targetFunction gets called again, the dispatching actions should be working well.
I am connecting to redux using
connect()
and within the targetFunction I want to dispatch an action. I see the action being dispatched in the Redux Inspector Chrome extension, but the state selector is not being called. When I dispatch the action OUTSIDE of the targetFunction, everything works as expected.See this plunker: https://plnkr.co/edit/oIujbcjwrOSr2egsmSWS?p=preview
I found several examples and tutorials doing what I did in the plunker. I can only assume they are not publishing non-working examples.. So, is this a bug in ngRedux or not supported at all? Is it considered bad practice dispatching actions from the targetFunction?
The text was updated successfully, but these errors were encountered: