diff --git a/docs/framework/angular/guides/invalidations-from-mutations.md b/docs/framework/angular/guides/invalidations-from-mutations.md index 33857a8204..8c05262d5e 100644 --- a/docs/framework/angular/guides/invalidations-from-mutations.md +++ b/docs/framework/angular/guides/invalidations-from-mutations.md @@ -8,11 +8,9 @@ replace: { 'useMutation': 'injectMutation', 'hook': 'function' } [//]: # 'Example' ```ts -class TodoItemComponent { - mutation = injectMutation(() => ({ - mutationFn: postTodo, - })) -} +mutation = injectMutation(() => ({ + mutationFn: postTodo, +})) ``` [//]: # 'Example' @@ -33,9 +31,6 @@ export class TodosComponent { onSuccess: () => { this.queryClient.invalidateQueries({ queryKey: ['todos'] }) this.queryClient.invalidateQueries({ queryKey: ['reminders'] }) - - // OR use the queryClient that is injected into the component - // this.queryClient.invalidateQueries({ queryKey: ['todos'] }) }, })) }