diff --git a/src/content/6/en/part6d.md b/src/content/6/en/part6d.md index 936c7669898..37a8b639379 100644 --- a/src/content/6/en/part6d.md +++ b/src/content/6/en/part6d.md @@ -379,8 +379,8 @@ const App = () => { mutationFn: createNote, // highlight-start onSuccess: (newNote) => { - const notes = queryClient.getQueryData('notes') - queryClient.setQueryData('notes', notes.concat(newNote)) + const notes = queryClient.getQueryData(['notes']) + queryClient.setQueryData(['notes'], notes.concat(newNote)) // highlight-end } }) diff --git a/src/content/6/fi/osa6d.md b/src/content/6/fi/osa6d.md index 269924b19c4..f9a2e04a36d 100644 --- a/src/content/6/fi/osa6d.md +++ b/src/content/6/fi/osa6d.md @@ -380,8 +380,8 @@ const App = () => { mutationFn: createNote, // highlight-start onSuccess: (newNote) => { - const notes = queryClient.getQueryData('notes') - queryClient.setQueryData('notes', notes.concat(newNote)) + const notes = queryClient.getQueryData(['notes']) + queryClient.setQueryData(['notes'], notes.concat(newNote)) // highlight-end } })