Skip to content

Don't overwrite passed props to mapDispatchToProps with the default #11

Open
@oskarhane

Description

@oskarhane

I found an unexpected behavior when defining second argument received by mapDispatchToProps to have a default value.
The default value is always passed to it, even though other props are defined on the component.

I created a test to demonstrate it: oskarhane@b0a2b89

If the default is removed:
let mapDispatchToProps = (d, p = {}) => { to
let mapDispatchToProps = (d, p) => {
it works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions