React Quiz Practice
Active Recall Drill Session
← Exit SessionQuestion 1 of 1
easyReact
What does this log when the button is clicked?
code
function Counter() {
const [count, setCount] = useState(0);
function handleClick() {
setCount(count + 1);
console.log(count);
}
return <button onClick={handleClick}>{count}</button>;
}