Loading…

A setInterval inside useEffect with an empty dependency array always logs the initial count. Explain the stale closure and two ways to fix it. · Araket