How to code the counter ?
Posted on Mar 16, 2022Remember this concept,
Start s-m-a-l-l to create something BIG
To create a counter component, We have to :
- Create a state that hold the count
- Lets start count from 0
- Make a method to increase the count
- Make a method to decrease the count
- On click the increase + button, increase and update the count
- On click the decrease - button, decrease and update the count