Skip to content

Glossary: React Beyond the Basics

instanceof

A JavaScript check that tests whether a value is an object of a given kind. `error instanceof Error` narrows an `unknown` thrown value so you can read `.message`.

Where the book teaches it

Related terms

unknownnarrowing