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

fix: useScroller performance #1622

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dislido
Copy link

@dislido dislido commented Feb 22, 2024

Submit a pull request for this project.

Why?

fix #1621

What?

ganttHorizontalBarRef默认值每次都会创建一个新的对象,导致依赖此变量的useCallback/useMemo失效

How?

useScroller不修改ganttHorizontalBarRef.current, 可以放在外面保持默认值引用不变

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

Successfully merging this pull request may close these issues.

fix: useScroller导致大量无效render
1 participant