decord/source/1503_useLazyValue.js
2026-08-06 08:05:19 +00:00

17 lines
354 B
JavaScript

// Module ID: 1503
// Function ID: 1504
// Name: useLazyValue
// Dependencies: [19]
// Exports: useLazyValue
// Module 1503 (useLazyValue)
import noop from "noop";
export const useLazyValue = function useLazyValue(arg0) {
const ref = React.useRef(undefined);
if (undefined === ref.current) {
ref.current = arg0();
}
return ref.current;
};