Queueing a Series of State Updates

把一系列 “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

码先生
Author: 码先生

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注