You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在页面导入 import Taro, { useRouter } from '@tarojs/taro' 并使用后页面报错
报错信息如下:
vendors-node_modules_taro_h5_prebundle_chunk-3QMFF3V4_js.js:5724 Uncaught TypeError: React.useMemo is not a function
at Object.useRouter (vendors-node_modules_taro_h5_prebundle_chunk-3QMFF3V4_js.js:5724:93)
at Component (index.tsx:17:1)
at renderWithHooks (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:12338:36)
at updateFunctionComponent (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:14761:40)
at updateSimpleMemoComponent (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:14647:28)
at updateMemoComponent (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:14572:36)
at beginWork (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:16128:40)
at HTMLUnknownElement.callCallback2 (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:3812:38)
at Object.invokeGuardedCallbackDev (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:3836:38)
at invokeGuardedCallback (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:3870:49)
期望结果
正常能使用taro中hook
实际结果
从taro中导出的hook都不能使用,都报相对应的错React.XXX is not a function
相关平台
H5
浏览器版本: Chrome 版本 127.0.6533.89
使用框架: React
复现步骤
在页面导入 import Taro, { useRouter } from '@tarojs/taro' 并使用后页面报错
报错信息如下:
vendors-node_modules_taro_h5_prebundle_chunk-3QMFF3V4_js.js:5724 Uncaught TypeError: React.useMemo is not a function
at Object.useRouter (vendors-node_modules_taro_h5_prebundle_chunk-3QMFF3V4_js.js:5724:93)
at Component (index.tsx:17:1)
at renderWithHooks (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:12338:36)
at updateFunctionComponent (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:14761:40)
at updateSimpleMemoComponent (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:14647:28)
at updateMemoComponent (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:14572:36)
at beginWork (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:16128:40)
at HTMLUnknownElement.callCallback2 (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:3812:38)
at Object.invokeGuardedCallbackDev (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:3836:38)
at invokeGuardedCallback (vendors-node_modules_taro_h5_prebundle_chunk-PBG56SMD_js.js:3870:49)
期望结果
正常能使用taro中hook
实际结果
从taro中导出的hook都不能使用,都报相对应的错React.XXX is not a function
环境信息
The text was updated successfully, but these errors were encountered: