fetchInfinite
Fetches the first pages of a list one after another, without touching the cache or the queues.
Made for server rendering: pass
dehydrated
to the
Hydrate
component to render them on the client.
Import
import { fetchInfinite } from "@hyper-fetch/core"
Source
Package
Usage
const { dehydrated } = await fetchInfinite(getFeed, {
pagination: { cursor: "cursor", next: "nextCursor", items: "data" },
pages: 2,
});
Parameters
fetchInfinite<R, P>(request: R, options: FetchInfiniteOptions<P>)
Parameters
| Name | Type | Description |
|---|---|---|
| request | | |
| options | |
Returns
Promise<FetchInfiniteResult<R, P>>

