Skip to content

Dispatching actions from targetFunction not working or supported? #133

Open
@tfrijsewijk

Description

@tfrijsewijk

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions