Skip to content

Glossary: React Basics

Spread-based update patterns

Also written: spread, ..., spread syntax

Copying an object or array with `...` and then changing one part, such as `{ ...options, giftWrap: true }` or `[...cart, item]`. Combined with `filter` and `map`, this is how you update state without editing the old value.

Where the book teaches it

Related terms

Immutable update