- Published on
Adding a useForm instance (from libraries like react-hook-form) to the dependency array of a useEffect often causes infinite re-renders because the useForm function creates a new form instance on every render. Since its reference changes every time, React triggers the useEffect continuously.