Deviopath › React

Never Below Zero

Easy · State

Build a counter with a "+" button and a "-" button. The <p> shows "Count: 0" at first.

"+" adds 1 and "-" subtracts 1, but the count must never go below 0.

Next: Show / Hide