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

useRequest 会导致初始化多渲染2次 #2311

Open
yfs-2000 opened this issue Sep 3, 2023 · 2 comments
Open

useRequest 会导致初始化多渲染2次 #2311

yfs-2000 opened this issue Sep 3, 2023 · 2 comments
Assignees
Labels

Comments

@yfs-2000
Copy link

yfs-2000 commented Sep 3, 2023

我知道是因为loading和data的变更导致的,有没有办法和swr一样去做这个Dependency Collection 和 Deep Comparison,我觉得一个项目可能会有非常多个request的使用,这个对性能的提升是非常巨大的。
https://swr.vercel.app/docs/advanced/performance

@hemengke1997
Copy link
Contributor

是开启了react18的严格模式吗?

@liuyib liuyib changed the title use-request 会导致初始化多渲染2次 useRequest 会导致初始化多渲染2次 Oct 18, 2023
@crazylxr
Copy link
Collaborator

crazylxr commented Apr 21, 2024

v4 值得考虑一下。

@crazylxr crazylxr added the v4 label Apr 21, 2024
@crazylxr crazylxr self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants