Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
16 lines
326 B
JavaScript
16 lines
326 B
JavaScript
// Module ID: 1507
|
|
// Function ID: 1508
|
|
// Dependencies: [19]
|
|
// Exports: useLazyValue
|
|
|
|
// Module 1507
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
|
|
export const useLazyValue = function useLazyValue(fn) {
|
|
const ref = noop.useRef(undefined);
|
|
if (undefined === ref.current) {
|
|
ref.current = fn();
|
|
}
|
|
return ref.current;
|
|
};
|