HomeTracks
Explorer···
THEEBUG
Completed0/6
Score0
JSXlesson3.jsx×
THEEBUGlesson3.jsx
1
import { useState } from "react";
2
 
3
function Counter() {
4
const [count, setCount] = ______(0);
5
return <p>Count: {count}</p>;
6
}
$[system] Theebug ready. Happy coding!
Code BlocksDrag blocks into the drop zones above
4 blocks available
useState
useEffect
useRef
useContext
Game Panel
0:000 pts
Level 3 of 6State with useState
0/1 slots correct
Objective
Call useState so the counter has somewhere to keep its count
Expected Output
Count: 0
Debug says:
A component's local variables reset every time it re-renders — state is React's way of remembering a value across renders. Which hook creates a piece of state?
Debug the Worm