decord/source/6681_useStableMemo.js

24 lines
537 B
JavaScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 6681
2026-07-24 07:16:23 +00:00
// Function ID: 51454
2026-07-20 16:05:17 +00:00
// Name: useStableMemo
2026-07-23 10:11:24 +00:00
// Dependencies: [31, 6682]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-23 10:11:24 +00:00
// Module 6681 (useStableMemo)
import { useRef } from "result";
2026-07-20 16:05:17 +00:00
let closure_3 = [];
export default function useStableMemo(arg0, items) {
const tmp = useRef();
const tmp2 = useRef(closure_3);
if (tmp2.current === closure_3) {
tmp.current = arg0();
tmp2.current = items;
2026-07-23 10:11:24 +00:00
} else if (!importDefault(6682)(items, tmp2.current)) {
2026-07-20 16:05:17 +00:00
tmp.current = arg0();
tmp2.current = items;
}
return tmp.current;
};