Skip to main content

Function: useFetchSearch()

useFetchSearch<T, P>(params, options, path): useSearchResponse<T>

Defined in: packages/core/src/react/hooks/useFetchSearch.ts:34

The useFetchSearch hook. Returns a collection of post entities

See useSearch for usage instructions.

Type Parameters

T

T extends PostEntity = PostEntity

P

P extends PostsArchiveParams = PostsArchiveParams

Parameters

params

The list of params to pass to the fetch strategy. It overrides the ones in the URL.

{ } | P

options

FetchHookOptions<FetchResponse<T[]>> = {}

The options to pass to the swr hook.

path

string = ''

The path of the url to get url params from.

Returns

useSearchResponse<T>