UNPKG

@devfamily/admiral

Version:

Admiral is a frontend framework for creating back office using React. It provides out-of-the-box components and tools that make developing an admin interface easy and fast.

7 lines (6 loc) 258 B
export default function useControlledState<T, R = T>(defaultStateValue: T | (() => T), option?: { defaultValue?: T | (() => T); value?: T; onChange?: (value: T, prevValue: T) => void; postState?: (value: T) => T; }): [R, (value: T) => void];