Skip to content

Commit 3ef54a3

Browse files
authored
Merge pull request #3827 from zeezephyr/patch-4
Correct reference for invalidateQueries('string')
2 parents ee7b20e + 7cf7d57 commit 3ef54a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/6/en/part6d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ const App = () => {
239239
Now that the mutation has been successfully executed, a function call is made to
240240

241241
```js
242-
queryClient.invalidateQueries('notes')
242+
queryClient.invalidateQueries({ queryKey: ['notes'] })
243243
```
244244

245245
This in turn causes React Query to automatically update a query with the key <i>notes</i>, i.e. fetch the notes from the server. As a result, the application renders the up-to-date state on the server, i.e. the added note is also rendered.

0 commit comments

Comments
 (0)