UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

11 lines (10 loc) 339 B
export interface UseStateHistoryHandlers<T> { set: (value: T) => void; back: (steps?: number) => void; forward: (steps?: number) => void; } export interface StateHistory<T> { history: T[]; current: number; } export declare function useStateHistory<T>(initialValue: T): [T, UseStateHistoryHandlers<T>, StateHistory<T>];