0.1.0 • Published 4 years ago

@hooks/raf v0.1.0

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

🎒 @hooks/raf

React hook to wrap requestAnimationFrame

NPM version Travis License

Install

npm i @hooks/raf

Usage

useRaf

useRaf(callback: C, deps?: readonly D[]): void

Parameters

callback: C

Will be executed before the each repaint.

deps?: readonly D[]

An array of values that, when modified, will clear and reset the callback effect. See https://reactjs.org/docs/hooks-reference.html#uselayouteffect.