This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
// Metro module 5361 (f5362).
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
export function useStableCallback(current) {
const ref = useRef(void 0);
useLayoutEffect(() => {
ref.current = current;
});
useEffect(() => () => {
ref.current = void 0;
}, []);
return useCallback(function(...args) {
const current2 = ref.current;
return current2 == null ? void 0 : current2.apply(ref, [...args]);
}, []);
}