把一系列 “State 更新” 放进队列
Setting a state variable will queue another render. But sometimes you might want to perform multiple operations on the value before queueing the next render. To do this, it helps to understand how React batches state updates.
参:https://react.dev/learn/queueing-a-series-of-state-updates