Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ExtractedCachedAsyncHookContract<R, T>

Extracted cached async hook

Extends the return type defined by CachedAsyncHookContract.

Used to extract single resources from cached resource colletions to prevent unnecessary requests.

Type parameters

  • R

    Extracted resource from the collection in T, e.g. Nation

  • T: R[]

    Resource collection type, e.g. NationCollection

Hierarchy

Index

Properties

Optional data

data: R

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