Type aliases
Action
Action<R>: { type: "FETCH_INIT" } | { payload: string; type: "FETCH_FAILED" } | { type: "FETCH_CANCELED" } | { payload: R; type: "FETCH_SUCCESS" }
Type parameters
Options
Options: { fetchOptions?: RequestInit; lazy?: undefined | false | true }
Type declaration
-
Optional fetchOptions?: RequestInit
-
Optional lazy?: undefined | false | true
State
State<R>: { data: R | null; error: string | null; loading: boolean; status: "pending" | "error" | "success" | "loading" }
Type parameters
Type declaration
-
data: R | null
-
error: string | null
-
loading: boolean
-
status: "pending" | "error" | "success" | "loading"