UNPKG

beautiful-react-hooks

Version:

A collection of beautiful (and hopefully useful) React hooks to speed-up your components and hooks development

6 lines (5 loc) 256 B
/** * Returns a safe state by making sure the given value is not null or undefined */ declare const useDefaultedState: <TValue>(defaultValue: TValue, initialState?: TValue) => (TValue | ((nextState: TValue) => void))[]; export default useDefaultedState;