decord/source/6802_useLazyValue.js

19 lines
356 B
JavaScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 6802
// Function ID: 6803
2026-07-20 16:05:17 +00:00
// Name: useLazyValue
2026-07-29 08:29:29 +00:00
// Dependencies: [19]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 6802 (useLazyValue)
2026-07-29 08:29:29 +00:00
import { useRef } from "noop";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
let closure_1 = {};
export default function useLazyValue(arg0) {
const tmp = useRef(closure_1);
if (tmp.current === closure_1) {
tmp.current = arg0();
}
return tmp.current;
};