Skip to main content
Version: 2.1.2

Addons

Addons provide a way to support and extend the behavior of Data Provider. Edit this page in Github and open a PR to submit your own plugin.

Looking for the API docs? Check out the Provider API or the Creating origin addons chapter for writing an addon.

Addon types

Origins

Origin addons provide specific data origins implementations

@data-provider/memory

Allows reading objects stored in memory, allowing to use them as dependencies in Data Provider Selectors as any other type of origin. As an extra, it provides CRUD methods for modifying the object properties, and then, related caches are cleaned automatically.

@data-provider/browser-storage

Allows reading objects saved in localStorage or sessionStorage, providing the "key" to access as Data provider id, and allowing to access different properties using Data Provider queries. As an extra, it provides CRUD methods for modifying the properties, and then, related caches are cleaned automatically.

@data-provider/axios

Allows reading data from REST APIs using Axios under the hood, and taking advantage of lots of its configuration options. As an extra, it provides CRUD methods for performing PUT, POST or PATCH requests on provider instances, and then, related caches are cleaned automatically.

@data-provider/prismic

Allows reading data from Prismic CMS API. Under the hood, it uses the prismic-javascript client to provide the Prismic data.

UI Bindings

UI bindings provide a way to connect easily Data Provider origins and selectors with different UI Frameworks.

@data-provider/react

Provides hooks and HOCs for easily connect React Components to the different properties of the state of the data providers (data, loading, loaded or error). It actively retrieves data from the provider, and refresh them each time the provider cache is cleaned.