Interface ApiGetState<TResponse>

interface ApiGetState<TResponse> {
    data: undefined | TResponse;
    error: unknown;
    loading: boolean;
}

Type Parameters

  • TResponse

Properties

Properties

data: undefined | TResponse

The data returned from the API call. Note that this will show the old data while loading new data on a refresh.

error: unknown

The error returned from the API call (when not 20x status)

loading: boolean

True when the API call is in progress.

Generated using TypeDoc