@mmcodemark/fuselage-hooks
Version:
React hooks for Fuselage, Rocket.Chat's design system and UI toolkit
12 lines • 495 B
TypeScript
/**
* Hook to create an array with stable identity if its elements are equal.
*
* @param array - the array
* @param compare - the equality function that checks if two array elements are
* equal
* @returns the passed array if the elements are NOT equals; the previously
* stored array otherwise
* @public
*/
export declare const useStableArray: <T extends unknown[]>(array: T, compare?: <T_1>(a: T_1, b: T_1) => boolean) => T;
//# sourceMappingURL=useStableArray.d.ts.map