Skip to content

Glossary: React Beyond the Basics

discriminated union

A union of object types that each have a `type` field with a different value. TypeScript narrows to the right member in each `case`, as with CartAction.

Where the book teaches it

Related terms

actionnarrowingreducer