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: exercises/01.1-hello-world/README.es.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
El mayor dolor de los desarrolladores front-end es **trabajar con el DOM** para crear HTML dinámico, algo que React.js hace de lo mejor.
4
4
5
-
React.js es una biblioteca de renderizado hecha para optimizar el DOM: Los programadores ahorran tiempo y el navegador es más rápido.
5
+
React.js es una librería de renderizado hecha para optimizar el DOM: Los programadores ahorran tiempo y el navegador es más rápido.
6
6
7
-
La biblioteca viene con una función llamada **ReactDOM.render** que tú puedes ver como un reemplazo de la clásica [propiedad innerHTML](https://www.w3schools.com/jsref/prop_html_innerhtml.asp).
7
+
La librería viene con una función llamada **ReactDOM.render** que tú puedes ver como un reemplazo de la clásica [propiedad innerHTML](https://www.w3schools.com/jsref/prop_html_innerhtml.asp).
8
8
9
9
`ReactDOM.render` recibe dos parámetros:
10
10
@@ -14,25 +14,25 @@ La biblioteca viene con una función llamada **ReactDOM.render** que tú puedes
14
14
Por ejemplo:
15
15
16
16
```js
17
-
importReactfrom'react'; //import the react library
18
-
importReactDOMfrom'react-dom'; //import react-dom to make react generate html
17
+
importReactfrom'react'; //importar la librería de react
18
+
importReactDOMfrom'react-dom'; //importar react-dom para que react genere el html
19
19
20
-
//WHAT: This variable contains all the HTML that will be rendered
20
+
//QUE: Esta variable contiene todo el HTML que va a ser renderizado
21
21
let output =<span>James is 12 years old</span>
22
22
23
-
//WHERE: A DOM element that will contain the entire react generated html
23
+
//DONDE: Un elemento DOM que contendrá todo el html generado por react
24
24
constmyDiv=document.querySelector('#myDiv');
25
25
26
-
//what //where
26
+
//que//donde
27
27
ReactDOM.render(output, myDiv);
28
28
```
29
29
30
30
La función `ReactDOM.render` establecerá el innerHTML de `myDiv` (un elemento DOM) para ser lo que sea que contenga la variable `output`, muy similar a como funciona `innerHTML`:
31
31
```js
32
-
//This is how you would do it without react.
32
+
//Así lo harías sin react
33
33
myDiv.innerHTML='<span>James is 12 years old</span>';
34
34
35
-
//This is not you would do it with react.
35
+
//así lo haces con react
36
36
ReactDOM.render(<span> James is 12 years old </span>, myDiv);
@@ -28,10 +28,10 @@ El documento HTML resultante se verá así:
28
28
</div>
29
29
```
30
30
31
-
Basicamente, ahora somos capaces de mezclar HTML y JS en el mismo documento sin tener que concatenar y usar strings. :smiley: ¡Interesante! :angry: ¿Verdad?
31
+
Básicamente, ahora somos capaces de mezclar HTML y JS en el mismo documento sin tener que concatenar y usar strings. :smiley: ¡Increíble! :angry: ¿Verdad?
32
32
33
33
## :speech_balloon: Instrucciones
34
34
35
35
El archivo index.js tiene una variable llamada `name` que puede contener un nombre.
36
36
37
-
Por favor, incluye esa variable dentro de la salida de react, reemplaza la variable con el `"James"`.
37
+
Por favor, incluye esa variable dentro del resultado(output) de react, reemplaza la variable con el `"James"`.
Copy file name to clipboardExpand all lines: exercises/01.5-building-html-from-arrays/README.es.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# `01.5` Construyendo desde arreglos
2
2
3
-
Con JSX también puedes crear **arreglos** de elementos HTML. E.g: si tenemos un arreglo de `<li>` podemos incluirlos todos dentro del documento a la vez, así:
3
+
Con JSX también puedes crear **arrays o arreglos** de elementos HTML. Por ejemplo: si tenemos un arreglo de `<li>` podemos incluirlos todos dentro del documento a la vez, así:
Actualiza la [función .map](https://medium.com/poka-techblog/simplify-your-javascript-use-map-reduce-and-filter-bd02c593cc2d) del código para crear un nuevo arreglo de `<li>` donde cada uno de ellos corresponde a un animal desde el arreglo original, el arreglo resultante debería ser algo como esto:
11
+
Actualiza la [función .map](https://medium.com/poka-techblog/simplify-your-javascript-use-map-reduce-and-filter-bd02c593cc2d) del código para crear un nuevo arreglo de `<li>` donde cada uno de ellos corresponde a un animal del arreglo original, el arreglo resultante debería ser algo como esto:
12
12
13
13
```jsx
14
14
constanimalsInHTML= [
@@ -25,4 +25,4 @@ Luego, inclúyelos juntos en el sitio web.
25
25
26
26
- Puedes usar el segundo parámetro de la función map como clave `key` para identificar de forma única cada elemento HTML.
27
27
28
-
Tu sitio web debería verse algo así: 
28
+
Tu sitio web debería verse algo así: 
Copy file name to clipboardExpand all lines: exercises/02-maping-array-to-li/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,4 +29,4 @@ And include them all together inside the website.
29
29
30
30
- You can use the second parameter of the map function as a `key` to uniquely identify each html item.
31
31
32
-
Your website should look like this: 
32
+
Your website should look like this: 
Copy file name to clipboardExpand all lines: exercises/02.1-maping-array-objects-to-li/README.es.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,4 +25,4 @@ E inclúyelos juntos en el sitio web.
25
25
26
26
- Puedes usar el segundo parametro de la función map como una `key` para identificar de forma única cada elemento html.
27
27
28
-
Tu sitio web debería verse así: 
28
+
Tu sitio web debería verse así: 
0 commit comments