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) 534 B
/** * Returns a ref containing 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 A ref containing the current snapshot of the object */ export declare const useSnapshotReference: <Input extends object | undefined>(input: Input, omit?: Set<keyof Input> | Array<keyof Input>) => import("react").RefObject<Input>;