Closed VriskaSerket51 closed 6 months ago
Currently, useNavigate and useModals create new instance every renders. This will cause infinite loop when someone uses hooks like:
const navigate = useNavigate(); useEffect(() => { // do something when path change or anything }, [navigate]);
By wrapping hooks with React.useMemo and React.useCallback, they will not create new one each render.
@VriskaSerket51 Thanks for those updates!
Released at v1.18.4
Currently, useNavigate and useModals create new instance every renders. This will cause infinite loop when someone uses hooks like:
By wrapping hooks with React.useMemo and React.useCallback, they will not create new one each render.