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

Function keepPreviousData

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

Source from the content-addressed store, hash-verified

410}
411
412export function keepPreviousData<T>(
413 previousData: T | undefined,
414): T | undefined {
415 return previousData
416}
417
418export function addToEnd<T>(items: Array<T>, item: T, max = 0): Array<T> {
419 const newItems = [...items, item]

Callers 1

utils.test.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected