external store

State held outside React, in a library, a module variable or a browser API, which components subscribe to for changes.

In more detail

React cannot see when such a store changes, so the store must notify subscribers and components must read it through useSyncExternalStore. Browser APIs such as the online status or a media query behave like external stores too.

Related terms

Taught in

References