UNPKG

@winglet/react-utils

Version:

React utility library providing custom hooks, higher-order components (HOCs), and utility functions to enhance React application development with improved reusability and functionality

9 lines (8 loc) 470 B
/** * Returns a snapshot of the object that only updates when the object actually changes. * Uses deep equality comparison to determine if the object has changed. * @param input - The object to create a snapshot of * @param omit - Properties to omit from the comparison * @returns The current snapshot value of the object */ export declare const useSnapshot: <Input extends object | undefined>(input: Input, omit?: Set<keyof Input> | Array<keyof Input>) => Input;