why does my useEffect loop with an empty dependency array
React 18.2, Next 14. I've got a useState holding an object and a useEffect with [] that does setForm({...form, loaded: true}). It fires over and over and I can't figure out why the empty array isn't stopping it. Tried useCallback on the handler and useMemo on the object, same thing. Console log runs forever. Am I missing something obvious here?
3 replies