react使用antd的菜单组件报错解决方案
react使用antd的菜单组件出现以下报错
Warning: Legacy context API has been detected within a strict-mode tree.
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
Please update the following components: SubMenu
解决方案:
(这里的antd版本: 4.2.5,react版本:16.13.1)
删除index.js中React.StrictMode
删除后
重新刷新页面,报错就没了
以上是 react使用antd的菜单组件报错解决方案 的全部内容, 来源链接: utcz.com/z/382363.html