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

Function updateState

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

Source from the content-addressed store, hash-verified

12
13/** @internal Copies each property from `update` onto `state`, in place, for every key already on `state`. */
14export function updateState(
15 state: Record<string, any>,
16 update: Record<string, any>,
17): void {
18 Object.keys(state).forEach((key) => {
19 state[key] = update[key]
20 })
21}
22
23// Helper function for cloning deep objects where
24// 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