Skip to content

Glossary: React Basics

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.

Where the book teaches it

Related terms

Snapshot (state)Setter function