Skip to content

Commit 5700859

Browse files
committed
update readme to reflect boolean as one of the options on invalidate
1 parent 45c4723 commit 5700859

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,15 @@ const [mutation] = useMutation(['todos', 1], {
330330
})
331331
```
332332

333+
To ignore invalidation, even with the same type as your mutation, just set `false` for the `invalidate` option:
334+
```JavaScript
335+
const [mutation] = useMutation(['todos', 1], {
336+
invalidate: false
337+
})
338+
```
339+
340+
This way the list of "todos" won't be updated after a mutation.
341+
333342
## Manual Requests
334343
Manual API requests can be performed through the client instance, which can be obtained with the [useClient](#useClient) hook
335344

0 commit comments

Comments
 (0)