Method KeepPreviousData
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
KeepPreviousData<T>(T?, QueryInfo?)
TanStack Query's keepPreviousData: the data of the last entry this component read that had
some, so a component changing its key keeps showing the old key's data until the new key's lands.
Pass it as PlaceholderData = QueryPlaceholder.KeepPreviousData.
public static QueryPlaceholder<T> KeepPreviousData<T>(T? previousData, QueryInfo? previousQuery)
Parameters
previousDataTThat entry's data.
previousQueryQueryInfo?That entry; null when there is no such entry.
Returns
- QueryPlaceholder<T>
The previous data, or no data when there is none.
Type Parameters
T