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

Function updateState

packages/vue-query/src/utils.ts:27–34  ·  view source on GitHub ↗
(
  state: Record<string, any>,
  update: Record<string, any>,
)

Source from the content-addressed store, hash-verified

25 * @param update - The object to copy the values from.
26 */
27export function updateState(
28 state: Record<string, any>,
29 update: Record<string, any>,
30): void {
31 Object.keys(state).forEach((key) => {
32 state[key] = update[key]
33 })
34}
35
36/**
37 * Recursive implementation of {@link cloneDeep}, which also tracks the key and nesting level of

Callers 4

useBaseQueryFunction · 0.90
updaterFunction · 0.90
useMutationFunction · 0.90
utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected