UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

12 lines (11 loc) 460 B
/** * Hook that returns a stable reference to an object that only changes * when the content of the object actually changes (deep comparison). * * This is useful for preventing unnecessary re-renders when objects are * recreated with the same content on every render. * * @param obj - The object to stabilize * @returns A stable reference to the object */ export declare function useStableObject<T extends Record<string, any> | undefined>(obj: T): T;