Files
discord-decomp/hooks/usePrevValue.tsx
T
2026-11-01 12:12:55 +02:00

12 lines
284 B
TypeScript

// Metro module 8332 (f8333).
import { useRef } from "react";
export default function usePrevValue(a0) {
const ref = useRef(null);
const ref2 = useRef(null);
if (!Object.is(a0, ref2.current)) {
ref.current = ref2.current;
ref2.current = a0;
}
return ref.current;
};