Skip to content
Function

useFetch

Declarative fetch with data, error and loading state.

See useFetch with a live demo

@danixsoft/hooks


useFetch<T>(url, options?): FetchState<T>

Type Parameters

T

T = unknown

Parameters

url

string

options?

RequestInit

Returns

FetchState<T>