Updater function
Also written: updater
A function passed to a state setter, such as `setBags((b) => b + 1)`. React calls it with the latest value, so several updates in a row or timer updates add up correctly.
Also written: updater
A function passed to a state setter, such as `setBags((b) => b + 1)`. React calls it with the latest value, so several updates in a row or timer updates add up correctly.