preact-redux
preact-redux copied to clipboard
Don't overwrite passed props to mapDispatchToProps with the default
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: https://github.com/oskarhane/preact-redux/commit/b0a2b89b54a0061e760575070db15350f115e68c
If the default is removed:
let mapDispatchToProps = (d, p = {}) => { to
let mapDispatchToProps = (d, p) => {
it works as expected.
I'm trying to figure out what could cause this, no luck so far.