Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CachedAsyncHookContract<T>

Cached async hook

Extends the return type defined by useSWR.

For more information about useSWR:

see

SWR Documentation

Type parameters

  • T

    Return type in the data attribute, e.g. a Nation

Hierarchy

Index

Properties

Optional data

data: T

Optional error

error: ApiError | Error

isValidating

isValidating: boolean

mutate

mutate: (data?: T | Promise<T>, shouldRevalidate?: boolean) => Promise<undefined | T>

Type declaration

    • (data?: T | Promise<T>, shouldRevalidate?: boolean): Promise<undefined | T>
    • Parameters

      • Optional data: T | Promise<T>
      • Optional shouldRevalidate: boolean

      Returns Promise<undefined | T>

Generated using TypeDoc