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

useRafLoop should pass the timestamp from requestAnimationFrame #1090

Closed
luaneko opened this issue Mar 31, 2020 · 3 comments · Fixed by #1096
Closed

useRafLoop should pass the timestamp from requestAnimationFrame #1090

luaneko opened this issue Mar 31, 2020 · 3 comments · Fixed by #1096
Assignees
Labels
enhancement New feature or request released

Comments

@luaneko
Copy link

luaneko commented Mar 31, 2020

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Pass the timestamp argument from requestAnimationFrame to the callback of useRafLoop.

Describe alternatives you've considered
Just call requestAnimationFrame myself which really defeats the purpose of this library.

@xobotyi xobotyi added the enhancement New feature or request label Apr 1, 2020
@xobotyi xobotyi self-assigned this Apr 1, 2020
xobotyi added a commit that referenced this issue Apr 1, 2020
streamich pushed a commit that referenced this issue Apr 4, 2020
# [14.0.0](v13.27.1...v14.0.0) (2020-04-04)

### Features

* **useRafLoop:** implement [#1090](#1090) ([1ef1272](1ef1272))
* **useRafLoop:** reworked the hook, now it do not re-render parent component. ([baa2f75](baa2f75))

### BREAKING CHANGES

* **useRafLoop:** changed return array, now it returns only functions in next order: [stop, start, isActive].

Parent component is not re-rendered on loop start/stop.
@streamich
Copy link
Owner

🎉 This issue has been resolved in version 14.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@luaneko
Copy link
Author

luaneko commented Apr 4, 2020

Thanks!

@xobotyi
Copy link
Contributor

xobotyi commented Apr 4, 2020

@phosphene47 note that whole hook has changed.
Read the docs again pls, there are some breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants