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

11 lines (10 loc) 583 B
import type { Dictionary } from '../@aileron/declare'; /** * Compares current properties with previous properties and returns the previous object if no changes occurred. * This helps prevent unnecessary re-renders by maintaining object reference stability. * Performs shallow comparison of all properties and their values. * @typeParam T - The type of the properties object * @param props - The properties object to compare * @returns The previous object if identical, otherwise the new object */ export declare const useRestProperties: <T extends Dictionary>(props: T) => T;