umi启动提示内存泄露问题? #11116
joraboy328
started this conversation in
General
umi启动提示内存泄露问题?
#11116
Replies: 1 comment 8 replies
-
umi 3 不维护了,建议升级到 umi 4 |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
UmiJS3 启动告警如下:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.at Overflow..........
查询网上说:这是由于在组件已被卸载后仍然尝试修改组件的状态所导致的问题。在组件被卸载后,无法使用setState来改变组件的状态,这会导致React引擎出现内存泄漏警告。
我发现配置路由菜单时,如果一旦设定name属性,就报错,如何解决此问题
routes:
[{
path: '/login',
component: '@/pages/login/index',
name:'登录',
layout:false,
hideInMenu:true
},]
Beta Was this translation helpful? Give feedback.
All reactions