Skip to content
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

组件会render2次 #44

Open
HoroXu opened this issue Apr 30, 2021 · 3 comments
Open

组件会render2次 #44

HoroXu opened this issue Apr 30, 2021 · 3 comments

Comments

@HoroXu
Copy link

HoroXu commented Apr 30, 2021

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

@CJY0208
Copy link
Member

CJY0208 commented May 6, 2021

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

@HoroXu
Copy link
Author

HoroXu commented May 6, 2021

image
没有看到这个组件

@HoroXu
Copy link
Author

HoroXu commented May 7, 2021

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

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

No branches or pull requests

2 participants