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

Class Consumer

packages/lit-query/src/__tests__/useIsMutating.test.ts:45–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 const mutationKey = createKey()
44
45 class Consumer extends LitElement {
46 readonly mutationKey = mutationKey
47
48 readonly mutation = createMutationController(this, {
49 mutationKey: this.mutationKey,
50 mutationFn: () => sleep(10).then(() => 'mutation-ok'),
51 })
52
53 readonly isMutating = useIsMutating(this, {
54 mutationKey: this.mutationKey,
55 })
56 }
57
58 customElements.define(generateElementName(), Consumer)
59 const consumer = new Consumer()

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.90
createMutationControllerFunction · 0.85
useIsMutatingFunction · 0.50

Tested by

no test coverage detected