@darwish/hooks-core
Version:
9 lines (8 loc) • 364 B
TypeScript
/**
* @description
* @param initialValue The initial state of the component
* @returns A tuple with two elements
* @module hooks/core/useSetState
* @see
*/
export default function useSetState<T extends Record<PropertyKey, any> | (() => Record<PropertyKey, any>)>(initialValue: T): readonly [T, (updateValue: Partial<T> | ((args: T) => Partial<T>)) => void];