Skip to main content

Function: usePrepareFetch()

usePrepareFetch<T, P>(_params, options): object

Defined in: packages/next/src/data/hooks/usePrepareFetch.ts:13

Prepares params and options for useFetch hooks

Type Parameters​

T​

T extends Entity | Entity[]

P​

P extends EndpointParams

Parameters​

_params​

Partial<P> = {}

The fetch params

options​

FetchHookOptions<FetchResponse<T>> = {}

The fetch options

Returns​

object

options​

options: FetchHookOptions<FetchResponse<T>>

params​

params: Partial<P>

path​

path: string