The react.js site has the following code on this page:
const [count, setCount] = useState(0);
...
<button onClick={() => setCount(count + 1)}>
But since count is updated based on its previous value, shouldn't the second line be
<button onClick={() => setCount(prevCount => prevCount + 1)}>