Skip to content
API/QubeeSWROptions

QubeeSWROptions

type
src/types/qubee-swr-options.type.ts1 member

Options of useQubeeSWR: SWR’s own configuration — fallbackData, revalidateOnFocus, refreshInterval and the rest — with its fetcher replaced by a QubeeFetcher.

import type { QubeeSWROptions } from '@qubeejs/react/swr';
type QubeeSWROptions<T extends PaginatedObject> = Omit<SWRConfiguration<PaginatedResult<T>, Error>, 'fetcher'> & { … }

Everything in Omit<SWRConfiguration<PaginatedResult<T>, Error>, 'fetcher'>, plus:

Member Type Description
fetcher? QubeeFetcher What performs the request, in place of the nearest QubeeFetchProvider’s fetcher. It has the shape of fetch, not of an SWR fetcher: it gets the address and the headers.

QubeeFetcher