Code AnalysisIntermediate 45s
useEffect cleanup
What does cleanup return?
Starter code
useEffect(() => {
const id = setInterval(fn, 1000);
return () => clearInterval(id);
}, []);Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.