UNPKG

@react-hookz/web

Version:

React hooks done right, for browser and SSR.

4 lines (3 loc) 270 B
import type { Dispatch, SetStateAction } from 'react'; export declare function useRafState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>]; export declare function useRafState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];