UNPKG

383 BTypeScriptView Raw
1export type Updater<State> = (prev: State) => State;
2/**
3 * Execute code before next frame but async
4 */
5export declare function useLayoutState<State>(defaultState: State): [State, (updater: Updater<State>) => void];
6/** Lock frame, when frame pass reset the lock. */
7export declare function useTimeoutLock<State>(defaultState?: State): [(state: State) => void, () => State | null];