MCPcopy Create free account
hub / github.com/SvelteStack/svelte-query / dispatch

Method dispatch

src/queryCore/core/mutation.ts:255–264  ·  view source on GitHub ↗
(action: Action<TData, TError, TVariables, TContext>)

Source from the content-addressed store, hash-verified

253 }
254
255 private dispatch(action: Action<TData, TError, TVariables, TContext>): void {
256 this.state = reducer(this.state, action)
257
258 notifyManager.batch(() => {
259 this.observers.forEach(observer => {
260 observer.onMutationUpdate(action)
261 })
262 this.mutationCache.notify(this)
263 })
264 }
265}
266
267export function getDefaultState<

Callers 3

setStateMethod · 0.95
executeMethod · 0.95
executeMutationMethod · 0.95

Calls 4

reducerFunction · 0.85
batchMethod · 0.80
onMutationUpdateMethod · 0.80
notifyMethod · 0.45

Tested by

no test coverage detected