Skip to content

Glossary: React Basics

key

Also written: keys, key prop

A special prop that names each item in a list so React can match old and new items. It should be unique among siblings and stable, such as the SKU, not the array index. Changing a component's key resets its state.

Where the book teaches it

Related terms

FragmentLifting state up