Skip to main content
Version: 5.x.x

getValidCacheData


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

Description

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

Preview

getValidCacheData<T>(request, initialData, cacheData)

Parameters

NameDetails

request

Required

T

initialData

Required

Partial<ExtractAdapterReturnType<T>>

cacheData

Required

CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>, AdapterInstance>

Returns

{
...params1: ResponseReturnType<Response, Error, Adapter>;
...params2: ResponseDetailsType;
cacheTime: number;
clearKey: string;
garbageCollection: number;
}