umi-plugin-keep-alive icon indicating copy to clipboard operation
umi-plugin-keep-alive copied to clipboard

组件会render2次

Open HoroXu opened this issue 3 years ago • 3 comments

添加插件,会导致组件重复渲染2次 image 去除插件,就正常了. image

HoroXu avatar Apr 30 '21 03:04 HoroXu

用 react devtools 看看根节点有没有 React 的 StrictMode 组件?之前有 issue 反馈存在这个节点时会多次渲染

CJY0208 avatar May 06 '21 01:05 CJY0208

image 没有看到这个组件

HoroXu avatar May 06 '21 02:05 HoroXu

image 有看到umi issues下别人提到的 ,是不是有这种可能导致的。不过我测试拿掉了dynamicImport ,仍然render 2次。提供这个思路,还希望能给点说明,谢谢

HoroXu avatar May 07 '21 06:05 HoroXu