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
+17-13Lines changed: 17 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ At the moment, there are two good options: [Relay](https://facebook.github.io/re
23
23
24
24
### Apollo client
25
25
26
-
Let us create a new React app, and can continue installing dependencies required by[Apollo client](https://www.apollographql.com/docs/react/get-started/).
26
+
Let's create a new React app and install the necessary dependencies for[Apollo client](https://www.apollographql.com/docs/react/get-started/).
27
27
28
28
```bash
29
29
npm install @apollo/client graphql
@@ -35,10 +35,12 @@ We'll start with the following code for our application:
Copy file name to clipboardExpand all lines: src/content/8/en/part8d.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ Interesting lines in the code have been highlighted:
55
55
56
56
```js
57
57
import { useState, useEffect } from'react'
58
-
import { useMutation } from'@apollo/client'
58
+
import { useMutation } from'@apollo/client/react'
59
59
import { LOGIN } from'../queries'
60
60
61
61
constLoginForm= ({ setError, setToken }) => {
@@ -164,7 +164,8 @@ const App = () => {
164
164
After the backend changes, creating new persons requires that a valid user token is sent with the request. In order to send the token, we have to change the way we define the *ApolloClient* object in <i>main.jsx</i> a little.
Copy file name to clipboardExpand all lines: src/content/8/es/part8d.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ Se han resaltado líneas interesantes en el código:
57
57
58
58
```js
59
59
importReact, { useState, useEffect } from'react'
60
-
import { useMutation } from'@apollo/client'
60
+
import { useMutation } from'@apollo/client/react'
61
61
import { LOGIN } from'../queries'
62
62
63
63
constLoginForm= ({ setError, setToken }) => {
@@ -167,7 +167,8 @@ const App = () => {
167
167
Después de que el backend cambie, la creación de nuevas personas requiere que se envíe un token de usuario válido con la solicitud. Para enviar el token, tenemos que cambiar un poco la forma en que definimos el objeto _ApolloClient_ en <i>index.js</i>.
0 commit comments