Components
useAsyncList
Hook that returns async data
We use the useAsyncList hook from react-spectrum stately package. It extends the useListData which is also from react-spectrum.
It supports async loading, pagination, sorting and filtering. It also manages loading and error states, supports abortable requests and works with any data fetching library or the built-in browser fetch API.
More information can be found in the react-spectrum documentation.
Import
import { useAsyncList } from '@marigold/components';Examples
Async Table
This is an example from the <Table> component. The data will be loaded asynchronously.
Name | Height | Mass | Birth Year |
|---|
Last update: 8 minutes ago