React Code Completion Easy +10 XP
Event Handler
Complete the click event handler.
ReactFill in the blank
<button ___={() => setCount(count + 1)}>Increment</button>Type the missing code
Show answer and explanation
Answer: onClick
React uses camelCase event handlers. onClick fires when the user clicks the element.
Hint: Which React event fires on mouse click?
What this challenge tests
Code Completion in React: events, jsx.