2026-08-15 05:55:55 +00:00
|
|
|
// Module ID: 1614
|
|
|
|
|
// Function ID: 1615
|
2026-08-06 08:05:19 +00:00
|
|
|
// Name: useDeepStableValue
|
2026-08-15 05:55:55 +00:00
|
|
|
// Dependencies: [19, 1576]
|
2026-08-06 08:05:19 +00:00
|
|
|
// Exports: useDeepStableValue
|
|
|
|
|
|
2026-08-15 05:55:55 +00:00
|
|
|
// Module 1614 (useDeepStableValue)
|
2026-08-24 06:08:38 +00:00
|
|
|
import equalDefault from "equal" /* 1576 */;
|
|
|
|
|
import closure_2 from "noop" /* 19 */;
|
2026-08-06 08:05:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
export const useDeepStableValue = function useDeepStableValue(current) {
|
|
|
|
|
const ref = React.useRef(current);
|
2026-08-24 06:08:38 +00:00
|
|
|
if (!equalDefault(ref.current, current)) {
|
2026-08-06 08:05:19 +00:00
|
|
|
ref.current = current;
|
|
|
|
|
}
|
|
|
|
|
return ref.current;
|
|
|
|
|
};
|