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

refactor: 优化 useScrollToBottom #2117

Merged
merged 1 commit into from
Jun 24, 2023

Conversation

JunJD
Copy link

@JunJD JunJD commented Jun 24, 2023

由于 useLayoutEffect 在页面渲染之前同步执行,因此具有阻塞页面渲染的能力,在某些情况下可能会导致性能问题。requestAnimationFrame 是一个动画帧请求,会在浏览器下一次重绘之前触发,用于实现平滑的动画效果。

@Yidadaa Yidadaa merged commit fb82806 into ChatGPTNextWeb:main Jun 24, 2023
alchemist139 pushed a commit to alchemist139/ChatGPT-Next-Web that referenced this pull request Sep 21, 2023
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this pull request May 16, 2024
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.

2 participants