@hooks/raf
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    🎒 @hooks/raf

    React hook to wrap requestAnimationFrame

    NPM version Travis License

    Install

    npm i @hooks/raf

    Usage

    useRaf

    useRaf(callbackC, 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.

    Install

    npm i @hooks/raf

    DownloadsWeekly Downloads

    9

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    3.72 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar