Merge State in useState

Typical Counter App

Krishna has a requirement to create a simple counter application, where on click of a button, the counter value is incremented by 20 and will be displayed on the screen. Once the counter value reaches 100, no further update can be done. After reaching 100, even if you click multiple times on the button, the counter value will not be incremented. The UI of the application is already in place and you need to write your logic only into handleClick function.



Solve the practice problems to earn    DevCoin image 
Coding Area

Copyright © 2022 opendevs

Learn ● Develop ● Ace
All illustrations by Storyset