Counter Card
Build a small counter that demonstrates React's state-driven rendering.
Requirements
- Store the count with
useState and initialize it to 0.
- Render the current value inside the provided
output element.
- Add buttons that increment and decrement by one.
- Add a reset button that restores zero.
- Use functional state updates for increment and decrement.
- Preserve the accessible labels on the icon-only buttons.
Stretch goal
Disable the decrement button when the counter reaches -10 and the increment button at 10.
Hints
- Calling a state setter triggers React to render the new value.
- A functional update looks like
setCount(current => current + 1).