采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
为什么我用useDispatch会报错
这里有一个 Provider ,是从 react-redux 引入的
看报错信息 please ensure the component is wrapped in a <Provider>
你的组件外层是不是用 react-redux 的 <Provider> 包裹了?
代码里没有 <Provider>包裹任何代码 卡了几天了
Uncaught Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider> ↑完整报错 然后报错锚点是提示useDispatch的时候已经报错
登录后可查看更多问答,登录/注册
React18+TS4+Antd5+Next.js13 ,B端+C 端,完整业务
1.6k 12
388 8
393 8
572 8
719 7
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号