UNPKG

@react-hookz/web

Version:

React hooks done right, for browser and SSR.

7 lines (6 loc) 311 B
import { type Dispatch, type 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>> ];