Skip to content

einouqo/use-raf

Repository files navigation

🎞️ use-raf

Build better UX with frame-synchronized hooks.

codecov CodSpeed Badge License

A hook collection built over the requestAnimationFrame window API

  • React Hooks:
    • useRafLoop - controlled, frame-synchronized repetitive callback execution.
    • useRafTimer - controlled, frame-synchronized timer / countdown.
    • useRafState - reactive state which updates on next repaint (requestAnimationFrame)
  • Utilities - frame-synchronized replacement for setTimeout and setInterval window's methods

About

A hook collection built over the requestAnimationFrame window API

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages