/** * Returns a referentially stable version of a value, only updating when the `identity` function * determines the value has meaningfully changed. * * This hook is useful for avoiding unnecessary re-renders or effect triggers when a new reference * is created on every render but the logical value hasn't changed (e.g. objects, arrays). * * @param value - The value to stabilize. * @param identity - A comparison function that returns `true` if the previous and next values * are considered equal, or `false` if the value should be updated. * * @returns The stabilized value that only changes when `identity` returns `false`. */ export declare function useStable(value: S, identity?: (previous: S, next: S) => boolean): S;