UNPKG

react-atom-toast

Version:
11 lines (9 loc) 400 B
declare function useControlledState<T>(option: { defaultValue?: T | (() => T); value?: T; onChange?: (value: T, prevValue: T) => void; beforeValue?: (value: T, prevValue: T) => T | undefined; postValue?: (value: T | undefined, prevValue: T) => T | undefined; onInit?: (value: T) => void; }): [T, (value: T | ((prevState: T) => T)) => void, T]; export { useControlledState };