import { useRef,useEffect } from 'react'; const usePrevious = (typeFile: string): string | undefined => { const ref = useRef(); useEffect(() => { ref.current = typeFile; }); return ref.current; }; export { usePrevious }