@@ -14,7 +14,7 @@ La [página anterior](/docs/hooks-intro.html) introdujo los Hooks con este ejemp
14
14
import { useState } from 'react';
15
15
16
16
function Example() {
17
- // Declare a new state variable, which we'll call "count"
17
+ // Declaración de una variable de estado que llamaremos "count"
18
18
const [count, setCount] = useState(0);
19
19
20
20
return (
@@ -68,7 +68,7 @@ Como recordatorio, un componente funcional en React es así:
68
68
69
69
``` js
70
70
const Example = (props ) => {
71
- // You can use Hooks here !
71
+ // Puedes usar Hooks aquí !
72
72
return < div / > ;
73
73
}
74
74
```
77
77
78
78
``` js
79
79
function Example (props ) {
80
- // You can use Hooks here !
80
+ // Puedes usar Hooks aquí !
81
81
return < div / > ;
82
82
}
83
83
```
@@ -126,7 +126,7 @@ En un componente funcional no existe `this` por lo que no podemos asignar o leer
126
126
import { useState } from 'react';
127
127
128
128
function Example() {
129
- // Declare a new state variable, which we'll call "count"
129
+ // Declaración de una variable de estado que llamaremos "count"
130
130
const [count, setCount] = useState(0);
131
131
```
132
132
@@ -142,7 +142,7 @@ Ahora que sabemos que hace el Hook `useState`, nuestro ejemplo debería tener m
142
142
import { useState } from 'react';
143
143
144
144
function Example() {
145
- // Declare a new state variable, which we'll call "count"
145
+ // Declaración de una variable de estado que llamaremos "count"
146
146
const [count, setCount] = useState(0);
147
147
```
148
148
@@ -262,7 +262,7 @@ En el componente de arriba tenemos `age`, `fruit`, y `todos` como variables loca
262
262
263
263
` ` ` js
264
264
function handleOrangeClick () {
265
- // Similar to this.setState({ fruit: 'orange' })
265
+ // Similar a this.setState({ fruit: 'orange' })
266
266
setFruit (' orange' );
267
267
}
268
268
` ` `
0 commit comments