You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/8/en/part8b.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ When the button <i>show address</i> of a person is pressed, the name of the pers
322
322
</button>
323
323
```
324
324
325
-
This causes the component to re-render itself. On render the query <i>FIND_PERSON</i> that fetches the detailed information of a user is executed <i>if the variable nameToSearch</i> has a value:
325
+
This causes the component to re-render itself. On render the query <i>FIND_PERSON</i> that fetches the detailed information of a user is executed if the variable <i>nameToSearch</i> has a value:
326
326
327
327
```js
328
328
constresult=useQuery(FIND_PERSON, {
@@ -587,7 +587,7 @@ Trying to create a person with invalid data causes an error:
587
587
588
588
We should handle the exception. We can register an error handler function to the mutation using the *useMutation* hook's *onError* [option](https://www.apollographql.com/docs/react/api/react/hooks/#params-2).
589
589
590
-
Let's register the mutation with an error handler that uses the _setError_*
590
+
Let's register the mutation with an error handler that uses the _setError_
591
591
function it receives as a parameter to set an error message:
592
592
593
593
```js
@@ -784,7 +784,7 @@ The current code of the application can be found on [GitHub](https://github.com/
784
784
785
785
### Apollo Client and the applications state
786
786
787
-
In our example, management of the applications state has mostly become the responsibility of Apollo Client. This is a quite typical solution for GraphQL applications.
787
+
In our example, management of the applications state has mostly become the responsibility of Apollo Client. This is quite a typical solution for GraphQL applications.
788
788
Our example uses the state of the React components only to manage the state of a form and to show error notifications. As a result, it could be that there are no justifiable reasons to use Redux to manage application state when using GraphQL.
789
789
790
790
When necessary, Apollo enables saving the application's local state to [Apollo cache](https://www.apollographql.com/docs/react/local-state/local-state-management/).
0 commit comments