Skip to content

Add sanity check for accidentally passing two separate enhancers? #3114

@markerikson

Description

@markerikson

I've occasionally seen people passing two separate store enhancers to createStore() (as seen in this SO question ). This is always an error, and it seems like we could add an additional sanity check to createStore() - probably just checking to see if we have 3 args, and if the second and third are both functions. (I would think we can safely assume that the preloadedState argument shouldn't be a function.) It's a rarer problem, but it's preventable.

Thoughts?

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