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

Function successState

packages/query-core/src/query.ts:731–739  ·  view source on GitHub ↗
(data: TData | undefined, dataUpdatedAt?: number)

Source from the content-addressed store, hash-verified

729}
730
731function successState<TData>(data: TData | undefined, dataUpdatedAt?: number) {
732 return {
733 data,
734 dataUpdatedAt: dataUpdatedAt ?? Date.now(),
735 error: null,
736 isInvalidated: false,
737 status: 'success' as const,
738 }
739}
740
741function getDefaultState<
742 TQueryFnData,

Callers 2

setOptionsMethod · 0.85
reducerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected