useEffect !== componentDidMount
One of useEffect's uses is to perform an effect when a component is first mounted, and not to repeat it. However, React's compiler always breathes down your neck about adding dependencies to useEffect's dependency array. Most of the time, sure, the d...
May 8, 20211 min read36