Skip to content

Commit 311da68

Browse files
authored
update links in part8d.md
1 parent 600abd3 commit 311da68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/8/en/part8d.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ Use of the effect hook is necessary to avoid an endless rendering loop.
114114

115115
Let's also add a button which enables a logged-in user to log out. The button's onClick handler sets the *token* state to null, removes the token from local storage and resets the cache of the Apollo client. The last step is [important](https://www.apollographql.com/docs/react/networking/authentication/#reset-store-on-logout), because some queries might have fetched data to cache, which only logged-in users should have access to.
116116

117-
We can reset the cache using the [resetStore](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.resetStore) method of an Apollo *client* object.
118-
The client can be accessed with the [useApolloClient](https://www.apollographql.com/docs/react/api/react-hooks/#useapolloclient) hook:
117+
We can reset the cache using the [resetStore](https://www.apollographql.com/docs/react/api/core/ApolloClient#resetstore) method of an Apollo *client* object.
118+
The client can be accessed with the [useApolloClient](https://www.apollographql.com/docs/react/api/react/hooks#useapolloclient) hook:
119119

120120
```js
121121
const App = () => {
@@ -271,7 +271,7 @@ query ALLPERSONS in the cache by adding the new person to the cached data.
271271
272272
In some situations, the only sensible way to keep the cache up to date is using the *update* callback.
273273
274-
When necessary, it is possible to disable cache for the whole application or [single queries](https://www.apollographql.com/docs/react/api/react/hooks/#options) by setting the field managing the use of cache, [fetchPolicy](https://www.apollographql.com/docs/react/data/queries/#configuring-fetch-logic) as <em>no-cache</em>.
274+
When necessary, it is possible to disable cache for the whole application or [single queries](https://www.apollographql.com/docs/react/api/react/hooks/#options) by setting the field managing the use of cache, [fetchPolicy](https://www.apollographql.com/docs/react/data/queries#setting-a-fetch-policy) as <em>no-cache</em>.
275275
276276
Be diligent with the cache. Old data in the cache can cause hard-to-find bugs. As we know, keeping the cache up to date is very challenging. According to a coder proverb:
277277

0 commit comments

Comments
 (0)