taro-calendar-customizable
taro-calendar-customizable copied to clipboard
taro项目依赖的react升级到最新版后,组件报错。
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
- You might have mismatching versions of React and the renderer (such as React DOM)
- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
taro 3.3.7 版本 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 Z (._node_modules_taro-calendar-customizable_node_modules_react_cjs_react.production.min.js:19) at exports.useState (._node_modules_taro-calendar-customizable_node_modules_react_cjs_react.production.min.js:25) at Days (._node_modules_taro-calendar-customizable_src_pages_calendar_days_index.tsx:220) at le (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:74) at Ve (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:97) at Ue (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:95) at Se (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:94) at gh (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:188) at fh (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:167) at eh (._node_modules_react-reconciler_cjs_react-reconciler.production.min.js:167)
package.json
"peerDependencies": {
"react": "^17.0.2"
},
同样报错! https://reactjs.org/docs/error-decoder.html?invariant=321
"@tarojs/taro": "3.3.16",
"taro-calendar-customizable": "^2.1.2",
node 16.18.0
同,还没有解决方案
"@tarojs/react": "3.2.16",
"@tarojs/taro": "3.2.16",
"react": "^17.0.0",
"taro-calendar-customizable": "^2.1.2",