From 28a9b0941267f8fe05e4c0a4b3442e759c26f665 Mon Sep 17 00:00:00 2001 From: rj-morgan <68881032+rj-morgan@users.noreply.github.com> Date: Tue, 28 Jul 2020 10:19:31 +0900 Subject: [PATCH] docs: fix code for custom mutation hook --- docs/src/pages/docs/guides/updates-from-mutation-responses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/pages/docs/guides/updates-from-mutation-responses.md b/docs/src/pages/docs/guides/updates-from-mutation-responses.md index 76a9c5322d0..899a162d8ac 100644 --- a/docs/src/pages/docs/guides/updates-from-mutation-responses.md +++ b/docs/src/pages/docs/guides/updates-from-mutation-responses.md @@ -25,7 +25,7 @@ create a custom hook like this: ```js const useMutateTodo = () => { - return useMutate(editTodo, { + return useMutation(editTodo, { // Notice the second argument is the variables object that the `mutate` function receives onSuccess: (data, variables) => { queryCache.setQueryData(['todo', { id: variables.id }], data)