React Hook “useSelector“ cannot be called at the top level. React Hooks must
一般报这个错的话,就是useSelector写在了函数组件外边解决办法就是//项目的根组件import{useSelector}from"react-redux";functionApp(){constcount=useSelector(state=>state.counter)returnthisistitle{count};}exportdefaultApp;