API/@qubeejs/react/fetch
@qubeejs/react/fetch
@qubeejs/react/fetch — fetch one page of a list, anywhere.
A server-safe entry point: it is not a client module and imports nothing from React, so a Server Component, a route loader or a script can call it. The hooks that fetch are in the main entry, and call the same function.
| Import from | @qubeejs/react/fetch |
| Needs | Nothing beyond the package and its two peers, react and @qubeejs/core. |
| Runs in | Anywhere — a Server Component, a route loader, a script: the entry is not a client module and imports nothing from React. |
Exports
Section titled “Exports”| Export | Kind | What it is |
|---|---|---|
| fetchQubeePage() | function | Fetch one page of a list and parse it with the driver that built the request. |
| QubeeFetcher | type | The function the fetching APIs call to perform a request. |
| QubeeFetchError | error | Thrown by fetchQubeePage — and reported by the hooks built on it — when the API answers with a status that is not ok. |