💾K
Size: a a a
💾K
BE
V
💾K
V
VP
💾K
VP
AO
BE
BE
BE
AO
АР
P
export const usePrevious = <T>(value: T): T | undefined => {
const ref = useRef<T>();
useEffect(() => {
ref.current = value;
console.log(ref.current)
});
return ref.current;
}
const [currPatient, setPatient] = useState<Patient>(patient)
const prevPatient = usePrevious(patient);
BE
ИВ
๖
АР
๖