UNPKG

reakit-utils

Version:

Reakit utils

7 lines (6 loc) 273 B
export declare type SealedInitialState<T> = T | (() => T); /** * React custom hook that returns the very first value passed to `initialState`, * even if it changes between re-renders. */ export declare function useSealedState<T>(initialState: SealedInitialState<T>): T;