decord/source/1523_useLazyValue.js
2026-08-24 06:08:38 +00:00

17 lines
368 B
JavaScript

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