The Stubborn Counter
Rapid clicks are batched, but the like counter increases only once instead of once per click.
The bug report
You get the whole project — a React front end, an Express API, and Mongoose models — opened in a browser editor. Reproduce the symptom by reading the code, change what’s wrong, and run the hidden tests to prove it.
What the fix must prove
- increments once for one click
- counts every rapid click in one render batch
- does not mutate the captured count value