Interface SWRResponse<Data, Error, Config>

interface SWRResponse<Data = any, Error = any, Config = any> {
    data: BlockingData<Data, Config> extends true ? Data : undefined | Data;
    error: undefined | Error;
    mutate: KeyedMutator<Data>;
    isValidating: boolean;
    isLoading: IsLoadingResponse<Data, Config>;
}

Type Parameters

  • Data = any
  • Error = any
  • Config = any

Properties

data: BlockingData<Data, Config> extends true ? Data : undefined | Data

The returned data of the fetcher function.

error: undefined | Error

The error object thrown by the fetcher function.

isValidating: boolean