Skip to content

Dispatching an action creator should result in an error #3299

@thSoft

Description

@thSoft

This example contains a subtle bug: in line 15, the action creator is dispatched instead of the action itself.

If you click on the increment button, nothing happens and the programmer might be confused why, so I think this should be an error either at compile-time (I'm aware of #2896 but it doesn't explicitly mention this case) or at runtime (maybe a warning should be printed when an action is not handled by any reducer?).

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