MCPcopy
hub / github.com/TanStack/query / updateState

Function updateState

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

Source from the content-addressed store, hash-verified

9}
10
11export function updateState(
12 state: Record<string, any>,
13 update: Record<string, any>,
14): void {
15 Object.keys(state).forEach((key) => {
16 state[key] = update[key]
17 })
18}
19
20// Helper function for cloning deep objects where
21// the level and key is provided to the callback function.

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…