Update docs/source/tutorial/local-state.md

Co-Authored-By: Peggy Rayzis <peggyrayzis@gmail.com>
This commit is contained in:
Hugh Willson
2019-08-05 13:16:18 -04:00
committed by GitHub
parent f6b699d35f
commit 1d3560a3b0

View File

@@ -263,7 +263,7 @@ const StyledButton = styled('button')(menuItemClassName, {
When we click the button, we perform a direct cache write by calling `client.writeData` and passing in a data object that sets the `isLoggedIn` boolean to false.
We can also perform direct writes within the `update` function of the `useMutation` Hook. The `update` function allows us to manually update the cache after a mutation occurs without refetching data. Let's look at an example in `src/containers/book-trips.js`:
We can also perform direct writes within the `update` function of the `useMutation` hook. The `update` function allows us to manually update the cache after a mutation occurs without refetching data. Let's look at an example in `src/containers/book-trips.js`:
_src/containers/book-trips.js_