A like button shows a count and toggles between liked and unliked. Clicking Like adds 1 to the count. Clicking Unlike should remove 1 — instead the count keeps going up.
Click Like — count goes to 1, button shows Unlike. Click Unlike — count goes to 2 instead of back to 0. Every click increments regardless of direction.
The reducer handles the UNLIKE action, but the button dispatches the wrong action type — it dispatches LIKE on both clicks.
The reducer handles the UNLIKE action, but the button dispatches the wrong action type — it dispatches LIKE on both clicks.