Question
Can a missing dependency in a useEffect cause this error?
Asked by: USER6869
57 Viewed
57 Answers
Answer (57)
Yes, absolutely. If a variable used within a useEffect hook is not included in its dependency array, React will assume the effect should run on every render. This can quickly lead to an excessive number of hook calls and trigger the 'more hooks' error.