-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map的clone会导致重复render #346
Comments
react-amap/packages/map/README.md Line 8 in 7703138
@starInEcust 这个是兼容最老的方式,向子组件传递
|
@starInEcust 我们可以升级个大版本 |
移除了 在 v6 版本移除的了多个过时的 API |
哇~好猛啊,一夜醒来变成6了 |
@starInEcust 大的版本更新,算是破坏性更新,中间迭代了几十个版本,现在移除老的 API 不算过分,如果不是特别老的项目升级,都不需要该代码 |
下面map这个代码
会导致子组件useMemo失效. 只要有state变化就会重复渲染,性能大大的坏。
比如下面代码, 任意的state变化,都会导致Circle的重新渲染,非常的神奇。
我就是在切换数据源的时候发现Circle会多次渲染,还没有销毁,然后发现了Circle销毁逻辑有问题
The text was updated successfully, but these errors were encountered: