Skip to main content
๐Ÿ› Bug HuntRX React Mediumโšก+20 XP

useEffect Cleanup

This component leaks a timer when unmounted.

๐Ÿ› Find the bug
1useEffect(() => {
2 const id = setInterval(() => tick(), 1000);
3}, []);
๐Ÿ› The bug is on line 3

๐Ÿ”ง Select the correct fix: