Closed BarrySong97 closed 3 years ago
我在默认的 antd-pro v5 项目中没有复现这个问题,需要提供更详细的复现信息例如 config 文件
我在默认的 antd-pro v5 项目中没有复现这个问题,需要提供更详细的复现信息例如 config 文件
@yangzhenxi 需要给复现步骤或仓库。
Hello @BarrySong97. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox umi or using yarn create @umijs/umi-app
to create and upload it to your GitHub repository.
你好 @BarrySong97, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox umi 或使用 yarn create @umijs/umi-app
创建,并上传到你的 GitHub 仓库。
Since the issue was labeled with Need Reproduce
, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply.
由于该 issue 被标记为需要可复现步骤,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。
What happens?
开启mfsu以后dumi 组件展示报错,关闭以后就恢复 nvalid 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. Error: 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. at Object.throwInvalidHookError (http://localhost:8000/mf-dep_vendors-node_modules_react-dom_index_js.dc58d0bf.async.js:14915:13) at Object.useRef (http://localhost:8000/mf-dep_vendors-node_modules_react_index_js.699149b9.async.js:1626:21) at useForm (http://localhost:8000/mf-dep_vendors-node_modules_rc-field-form_es_index_js.dbcb1766.async.js:3701:52) at Object.useForm (http://localhost:8000/mf-dep_vendors-node_modules_antd_es_form_index_js.42221d29.async.js:1191:74) at _callee$ (http://localhost:8000/dumi_demos.js:75:46) at tryCatch (http://localhost:8000/mf-dep_vendors-node_modules_umi_node_modules_regenerator-runtime_runtime_js.62774c63.async.js:53:40) at Generator.invoke [as _invoke] (http://localhost:8000/mf-dep_vendors-node_modules_umi_node_modules_regenerator-runtime_runtime_js.62774c63.async.js:282:22) at Generator.prototype. [as next] (http://localhost:8000/mf-dep_vendors-node_modules_umi_node_modules_regenerator-runtime_runtime_js.62774c63.async.js:105:21) at asyncGeneratorStep (http://localhost:8000/mf-dep_src_umi_cache_mfsu_mf-va_D__code_technology-and-economy_node_modules__umijs_babel-preset-umi_-c9ffba.12b8779d.async.js:16:24) at _next (http://localhost:8000/mf-dep_src_umi_cache_mfsu_mf-va_D__code_technology-and-economy_node_modules__umijs_babel-preset-umi_-c9ffba.12b8779d.async.js:38:9)