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

useDebounceEffect & useThrottleEffect ,当 callback 被执行前,多了一次额外的 rerender #2398

Open
Damon0820 opened this issue Dec 12, 2023 · 1 comment

Comments

@Damon0820
Copy link

问题

这可能不是一个 bug,是一个性能问题。使用useDebounceEffect & useThrottleEffect ,当 callback 被执行前,多了一次额外的 rerender,即下图红色圈起来的部分。

image

demo

@Damon0820 Damon0820 changed the title useDebounceEffect & useThrottleEffect 触发 callback 前,多了一次额外的 render useDebounceEffect & useThrottleEffect ,当 callback 被执行前,多了一次额外的 rerender Dec 12, 2023
@liuyib
Copy link
Collaborator

liuyib commented Dec 18, 2023

后面我验证下哈~

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