Skip to content

Glossary: React Basics

AbortController

Also written: AbortError, abort

A browser object that can cancel a `fetch` request. In an effect's cleanup, the search aborts the old request when `query` changes, and the cancelled fetch throws an error named `AbortError`, which the code ignores.

Where the book teaches it

Related terms

Cleanup functionfetchuseEffect