useReRender
import { useEffect, useState } from 'react';
export function useReRender(deps: any) {
const [visible, setVisible] = useState(false);
useEffect(() => {
setVisible(false);
setTimeout(() => {
setVisible(true);
}, 300);
}, [deps]);
return { visible };
}