UNPKG

use-sharable-state

Version:
5 lines (4 loc) 239 B
declare type Action<S> = (prevState: S) => S; export declare type Dispatch<S> = (value: S | Action<S>) => void; export declare const useSharableState: <S>(stateKey: string, initialState?: S | undefined) => [S, Dispatch<S>]; export {};