A counter displays a number and a button that increments it by one on each click.
Clicking the button does nothing - the number stays at 0 no matter how many times you click.
Check what value you're actually passing to `setCount`.
Check what value you're actually passing to `setCount`.
Why this fixes it
`setCount(count)` passed the current value of `count` straight back into state - because React uses `Object.is` equality, it compared the new value against the old one, saw they were identical, and bailed out of the re-render entirely. Changing the argument to `count + 1` produces a value that is always different from the current state. React detects the new value, schedules a re-render, and the updated count appears on screen.