[英]React Redux: Can useDispatch be used to connect to an action creator? If so , how?
如果我使用的是功能组件,如何使用useDispatch或其他替代方法连接到动作创建器函数?
I got it. 我知道了。
const dispatch = useDispatch()
dispatch(actionCreator())
it's in the docs 它在文档中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.