Skip to main content

use-remote-data

Awesome data access for React

Remote Data pattern

Known from Elm and elsewhere, the Remote Data pattern models the different states of a data request in a principled manner.

Automatic invalidation and refresh

Need warm data? No problem, just say how long you want it to be valid

Lazy and caching

Declare all you data sources, and fetch only those needed to render.
Data lifetime follows component lifetime

Error handling

Graceful handling, with retry functionality out of the box.

Composable

One request? Ten requests? Fetch them all at once.
Still lazy, still invalidating, still with error handling and retry.

Powered by React

use-remote-data is built only with React hooks. ~4 kilobytes gzipped.