Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

🧐[问题]menu性能问题 #485

Open
MatriXiao88 opened this issue May 31, 2020 · 2 comments
Open

🧐[问题]menu性能问题 #485

MatriXiao88 opened this issue May 31, 2020 · 2 comments

Comments

@MatriXiao88
Copy link

🧐 问题描述 [详细地描述问题,让大家都能理解]

在同一级子菜单下,分别点击两个子菜单,会发现响应和动画都出现卡顿,参见下方的动图

简单用react性能工具分析了一下,是因为layout中的menu在响应点击的时候,做了整个菜单的更新,这样子看起来是做了多余的render

请问有没有优化的思路呢

💻 示例代码 [如果有必要,展示代码,线上示例,或仓库]

🚑 其他信息 [如截图等其他信息可以贴在这里]

comp

@qiangguyidi
Copy link

@chenshuai2144

@chenshuai2144
Copy link
Collaborator

可以试试用不可变数据重构一把

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants