decord/source/326_useRefEffect.js

26 lines
545 B
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 326
// Function ID: 4903
// Name: useRefEffect
2026-07-23 10:11:24 +00:00
// Dependencies: [31]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 326 (useRefEffect)
2026-07-23 10:11:24 +00:00
import result from "result";
({ useCallback: closure_0, useRef: closure_1 } = result);
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) {
ref.current();
ref.current = undefined;
}
if (null != arg0) {
2026-07-23 10:11:24 +00:00
ref.current = callback(arg0);
2026-07-20 16:05:17 +00:00
}
}, items);
};