zkytech / taro-calendar-customizable

可自定义部分样式的taro日历组件
MIT License
40 stars 13 forks source link

taro项目依赖的react升级到最新版后,组件报错。 #26

Open QingYuanO opened 3 years ago

QingYuanO commented 3 years ago

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:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. 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.
houhoz commented 3 years ago

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)

felix9ia commented 2 years ago

package.json

  "peerDependencies": {
    "react": "^17.0.2"
  },
cat-kun commented 1 year ago

同样报错! https://reactjs.org/docs/error-decoder.html?invariant=321

"@tarojs/taro": "3.3.16",
"taro-calendar-customizable": "^2.1.2",

node 16.18.0

midnight630 commented 1 year ago

image 同,还没有解决方案 "@tarojs/react": "3.2.16", "@tarojs/taro": "3.2.16", "react": "^17.0.0", "taro-calendar-customizable": "^2.1.2",