Day 1React Hooks

React Hook Infinite Loop

Click on the lines you believe contain bugs, then submit your answer.

challenge.jsx
1function Counter() {
2 const [count, setCount] = useState(0);
3
4 useEffect(() => {
5 setCount(count + 1);
6 });
7
8 return <div>{count}</div>;
9}
Click on lines to flag potential bugs