import type { ReactSetState, UseSafeStateOptions } from "../use-safe-state/index.cjs"; import type { Gettable } from "../utils/basic.cjs"; export interface UseRafStateOptions extends UseSafeStateOptions { } /** * A React Hook that uses [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) to update the state in the next frame for better performance. * * This Hook works similarly to [React.useState](https://react.dev/reference/react/useState), except for the timing of updates. */ export declare function useRafState(initialState: Gettable, options?: UseRafStateOptions): readonly [T, ReactSetState]; export declare function useRafState(): readonly [T | undefined, ReactSetState];