MCPcopy Create free account
hub / github.com/TanStack/query / keepPreviousData

Function keepPreviousData

packages/query-core/src/utils.ts:427–431  ·  view source on GitHub ↗
(
  previousData: T | undefined,
)

Source from the content-addressed store, hash-verified

425}
426
427export function keepPreviousData<T>(
428 previousData: T | undefined,
429): T | undefined {
430 return previousData
431}
432
433export function addToEnd<T>(items: Array<T>, item: T, max = 0): Array<T> {
434 const newItems = [...items, item]

Callers 1

utils.test.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected