Skip to content

Commit 6184a89

Browse files
Ayush Setharnoud-dv
Ayush Seth
andauthoredJan 3, 2025··
docs(angular-query): remove outdated comment from example
* Update invalidations-from-mutations.md * Update invalidations-from-mutations.md * restore first code snippet --------- Co-authored-by: Arnoud de Vries <6420061+arnoud-dv@users.noreply.github.com>
1 parent b25a41e commit 6184a89

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed
 

‎docs/framework/angular/guides/invalidations-from-mutations.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ replace: { 'useMutation': 'injectMutation', 'hook': 'function' }
88
[//]: # 'Example'
99

1010
```ts
11-
class TodoItemComponent {
12-
mutation = injectMutation(() => ({
13-
mutationFn: postTodo,
14-
}))
15-
}
11+
mutation = injectMutation(() => ({
12+
mutationFn: postTodo,
13+
}))
1614
```
1715

1816
[//]: # 'Example'
@@ -33,9 +31,6 @@ export class TodosComponent {
3331
onSuccess: () => {
3432
this.queryClient.invalidateQueries({ queryKey: ['todos'] })
3533
this.queryClient.invalidateQueries({ queryKey: ['reminders'] })
36-
37-
// OR use the queryClient that is injected into the component
38-
// this.queryClient.invalidateQueries({ queryKey: ['todos'] })
3934
},
4035
}))
4136
}

0 commit comments

Comments
 (0)
Please sign in to comment.