decord/source/5486_useRecyclingState.js

52 lines
1.2 KiB
JavaScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 5486
// Function ID: 5487
2026-07-29 08:29:29 +00:00
// Name: useRecyclingState
2026-07-31 08:44:05 +00:00
// Dependencies: [5420, 19, 5438]
2026-07-29 08:29:29 +00:00
// Exports: useRecyclingState
2026-07-31 08:44:05 +00:00
// Module 5486 (useRecyclingState)
2026-07-29 08:29:29 +00:00
import _slicedToArray from "_slicedToArray";
import noop from "noop";
let c3;
let c4;
let c5;
const require = arg1;
({ useCallback: c3, useMemo: c4, useRef: c5 } = noop);
export const useRecyclingState = function useRecyclingState(arg0, arg1, arg2) {
let tmp3;
const _require = arg0;
const dependencyMap = arg2;
let tmp = callback4(undefined);
const callback = tmp;
2026-07-31 08:44:05 +00:00
const obj = _require(5438);
[r10015, tmp3] = callback(_require(5438).useLayoutState(0), 2);
2026-07-29 08:29:29 +00:00
const callback2 = tmp3;
callback3(() => {
let tmpResult = closure_0;
2026-07-31 08:44:05 +00:00
if (typeof closure_0 !== "disabledUntil") {
2026-07-29 08:29:29 +00:00
tmpResult = tmp();
}
_slicedToArray.current = tmpResult;
if (closure_1 != null) {
tmp3();
}
}, arg1);
const items = [tmp3];
const items1 = [
tmp.current,
callback2((arg0, arg1) => {
let tmp = arg0;
2026-07-31 08:44:05 +00:00
if (typeof arg0 !== "disabledUntil") {
2026-07-29 08:29:29 +00:00
tmp = arg0(tmp.current);
}
if (tmp !== tmp.current) {
tmp2.current = tmp;
arg1((arg0) => arg0 + 1, arg1);
}
}, items)
];
return items1;
};