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 synchronously re-render bug of useRef hook #77

Merged
merged 1 commit into from
Dec 16, 2018

Conversation

hijiangtao
Copy link
Contributor

  • Another animation frame will be requested before the cleanup function for useEffect is executed.
  • Use useLayoutEffect to replace useEffect, in order to guarantee cancelAnimationFrame can work well.

More details can be found in issue #76

* Another animation frame will be requested before the cleanup function for `useEffect` is executed.
* Use `useLayoutEffect` to replace `useEffect`, in order to guarantee `cancelAnimationFrame` can work well.

More details can be found in issue streamich#76
Copy link
Owner

@streamich streamich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@streamich streamich merged commit 5d74348 into streamich:master Dec 16, 2018
streamich pushed a commit that referenced this pull request Dec 16, 2018
## [4.11.1](v4.11.0...v4.11.1) (2018-12-16)

### Bug Fixes

* synchronously re-render bug of useRaf hook ([#77](#77)) ([5d74348](5d74348))
@streamich
Copy link
Owner

🎉 This PR is included in version 4.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants