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

Class Page

packages/angular-query/src/__tests__/inject-is-mutating.test.ts:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 const key = createKey()
35
36 @Component({
37 template: `<div>mutating: {{ isMutating() }}</div>`,
38 })
39 class Page {
40 readonly mutation = injectMutation(() => ({
41 mutationKey: key,
42 mutationFn: (params: { par1: string }) => sleep(10).then(() => params),
43 }))
44 readonly isMutating = injectIsMutating()
45 }
46
47 const rendered = await render(Page)
48

Callers

nothing calls this directly

Calls 4

sleepFunction · 0.90
injectMutationFunction · 0.85
injectIsMutatingFunction · 0.85
ComponentFunction · 0.50

Tested by

no test coverage detected