Skip to main content
Version: 1.x.x

getValidCacheData


import { getValidCacheData } from "@hyper-fetch/react"

Description

Defined in helpers/use-tracked-state/use-tracked-state.utils.ts:33

Preview

getValidCacheData<T>(command, initialData, cacheData)

Parameters

NameDetails

command

Required

T

initialData

Required

ClientResponseType<ExtractResponse<T>, ExtractError<T>>

cacheData

Required

CacheValueType<ExtractResponse<T>, ExtractError<T>>

Returns

{
cacheTime: number;
clearKey: string;
data: ClientResponseType<Response, Error>;
details: CommandResponseDetails;
garbageCollection: number;
}