decord/source/335_useRefEffect.js

26 lines
540 B
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 335
// Function ID: 336
2026-07-20 16:05:17 +00:00
// Name: useRefEffect
2026-07-29 08:29:29 +00:00
// Dependencies: [19]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 335 (useRefEffect)
2026-08-24 06:08:38 +00:00
import noop from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ useCallback: c0, useRef: closure_1 } = noop);
2026-07-20 16:05:17 +00:00
export default function useRefEffect(arg0) {
2026-07-23 10:11:24 +00:00
const callback = arg0;
callback2 = callback2(undefined);
2026-07-20 16:05:17 +00:00
const items = [arg0];
2026-07-23 10:11:24 +00:00
return callback((arg0) => {
2026-07-20 16:05:17 +00:00
if (ref.current) {
2026-07-29 08:29:29 +00:00
obj.current();
obj.current = undefined;
2026-07-20 16:05:17 +00:00
}
if (null != arg0) {
2026-07-29 08:29:29 +00:00
obj.current = callback(arg0);
2026-07-20 16:05:17 +00:00
}
}, items);
};