Skip to main content
Version: 3.x.x

getValidCacheData


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

Description

Defined in react/src/helpers/use-tracked-state/use-tracked-state.utils.ts:35

Preview

getValidCacheData<T>(request, initialData, cacheData)

Parameters

NameDetails

request

Required

T

initialData

Required

ExtractAdapterReturnType<T>

cacheData

Required

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

Returns

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