0
我只是想知道为什么在初始化下面给出的函数的参数之后给出了一个“= {}”,这是一个空的默认值,任何人都可以回答这个问题吗?为什么react-redux connect()给出这样的默认值?
return function connect(
mapStateToProps,
mapDispatchToProps,
mergeProps,
{
pure = true,
areStatesEqual = strictEqual,
areOwnPropsEqual = shallowEqual,
areStatePropsEqual = shallowEqual,
areMergedPropsEqual = shallowEqual,
...extraOptions
} = {} ){ // code is here }
感谢大利德罗尔我,你解决了我的问题。 – Jackman
@杰克曼 - 欢迎:) –