React Redux 中mapStateToProps() 和mapDispatchToProps() 之间的区别? 我最近开始在学习中使用react-redux。我不知道两者都必须使用的地方。谁能解释一下我吗?以及两者同时使用的情况是什么。
mapStateToProps
mapStateToProps() returns an object with props derived from the state.
mapDispatchToProps
mapDispatchToProps() returns an object with functions that dispatch actions