Function useAnimationFrameCallback

  • Starts an animation loop after component is mounted, and stops it after component is unmounted.

    Parameters

    • cb: FrameRequestCallback

      A callback that is called in an animation frame.

    Returns void