Skip to content

KARENLABO/Simple-Counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot 2024-09-10 at 5 34 24 p m

Counter with limits

Description:

  1. Displays a counter that starts at 0.
  2. It has two buttons: one to increment the counter and one to decrement it.
  3. The counter cannot go above 10 or below 0. If it is at 10, the increment button must be disabled, and the same for the decrement button if the counter is at 0.
  4. (Optional) Add a "Reset" button to return the counter to 0.

Requirements:

  • Use useState to manage the state of the counter.
  • Control the state of the buttons (enabled/disabled) based on the value of the counter.
  • Dynamically render the buttons based on the value of the counter.
  • Create unit testing for All their functions.

Releases

No releases published

Packages

No packages published