easy10 min
Build a Counter
Build a simple counter component with increment, decrement, and reset buttons. The counter should display the current count and update when any button is clicked. This is the classic first exercise for learning useState.
Skills
useStateevent handling
Tests
- Renders with initial count of 0
- Increments the count when clicking Increment
- Decrements the count when clicking Decrement
- Resets the count when clicking Reset
Loading editor...