@sanity/form-builder
Version:
Sanity form builder
8 lines • 450 B
TypeScript
/**
* A hook that returns the previous value of a component variable
* This might be provided by React in the future (https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state)
* @param value The value to track. Will return undefined for first render
*/
export declare function usePrevious<T>(value: T): T | undefined;
export declare function usePrevious<T>(value: T, initial: T): T;
//# sourceMappingURL=usePrevious.d.ts.map