Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oskarhane opened this issue Mar 20, 2017 · 1 comment
Open

Comments

@oskarhane
Copy link

oskarhane commented Mar 20, 2017

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.

@developit
Copy link
Owner

I'm trying to figure out what could cause this, no luck so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants