Unhandled promise rejection Error: Minified React error #321; visit https://reactjs.org/docs/error-d

Unhandled promise rejection Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at Object.O (vendors-node_modules_taro_weapp_prebundle_chunk-HNXYJPH3_js.js? [sm]:1326)
    at exports.useContext (vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js.js? [sm]:265)
    at useReduxContext (vendors-node_modules_taro_weapp_prebundle_react-redux_js.js? [sm]:548)
    at useSelector2 (vendors-node_modules_taro_weapp_prebundle_react-redux_js.js? [sm]:574)
    at _callee2$ (routerView.js? [sm]:3007)
    at tryCatch (routerView.js? [sm]:5084)
    at Generator.<anonymous> (routerView.js? [sm]:5154)
    at Generator.next (routerView.js? [sm]:5106)
    at asyncGeneratorStep (routerView.js? [sm]:4935)
    at _next (routerView.js? [sm]:4938)(env: Windows,mp,1.05.2111300; lib: 2.30.2)

Reason for the error: the hook function cannot be written in the function, and this error will be reported as follows:

The hook function beginning with use must be written outside the function

 To write the hook outside the function

Guess you like

Origin blog.csdn.net/qq_46149597/article/details/129876970