decord/source/1614_useDeepStableValue.js
2026-08-24 06:08:38 +00:00

18 lines
461 B
JavaScript

// Module ID: 1614
// Function ID: 1615
// Name: useDeepStableValue
// Dependencies: [19, 1576]
// Exports: useDeepStableValue
// Module 1614 (useDeepStableValue)
import equalDefault from "equal" /* 1576 */;
import closure_2 from "noop" /* 19 */;
export const useDeepStableValue = function useDeepStableValue(current) {
const ref = React.useRef(current);
if (!equalDefault(ref.current, current)) {
ref.current = current;
}
return ref.current;
};