Learn useReducer Hook, then never going back to useState
Before proceeding let's see the syntax for both hooks,
Now we will be implementing the 'count' logic using both hooks.
Logic:
step 1: First the count value is set to 0.
step 2: we should be able to increment and decrement the count value.
useState ...
feza14.hashnode.dev2 min read