UNPKG

@react-hookz/web

Version:

React hooks done right, for browser and SSR.

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