Skip to content

Commit 461d98f

Browse files
authored
Merge pull request #111 from josemoracard/jose2-00-welcome
exercises 00-welcome to 02.2-mapping-array-of-objects-to-li
2 parents 5c1d186 + 35a3cc6 commit 461d98f

File tree

37 files changed

+256
-144
lines changed

37 files changed

+256
-144
lines changed

exercises/00-welcome/README.es.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Durante este curso aprenderás los siguientes conceptos:
1616

1717
## Lecturas Útiles:
1818

19-
+ [https://es.reactjs.org/docs/introducing-jsx.html](https://es.reactjs.org/docs/introducing-jsx.html)
20-
21-
+ [https://es.reactjs.org/](https://es.reactjs.org/)
19+
+ [https://es.react.dev/learn](https://es.react.dev/learn)
2220

2321
## Videos Útiles:
2422

@@ -30,17 +28,17 @@ Durante este curso aprenderás los siguientes conceptos:
3028

3129
Gracias a estas maravillosas personas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
3230

33-
1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) :computer: (idea) 🤔, (build-tests) :warning:, (pull-request-review) :eyes: (build-tutorial) :white_check_mark: (documentación) :book:
31+
1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻 (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅, (documentación) 📖
3432

35-
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribución: (programador) :computer:, (build-tests) :warning:
33+
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribución: (programador) 💻, (build-tests) ⚠️
3634

37-
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (traducción) :earth_africa:
35+
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (traducción) 🌍
3836

3937
Este proyecto sigue las especificaciones: [all-contributors](https://github.com/kentcdodds/all-contributors).
4038

4139
¡Todas las contribuciones son bienvenidas!
4240

4341
### Nota:
44-
> 🔹 Nosotros construimos los ejercicios incrementalmente, deberías sentir el progreso poco a poco, y esperamos que el incremento de la dificuldad entre los ejercicios nunca sea tan grande como para frustrarte.
42+
> 🔹 Nosotros construimos los ejercicios incrementalmente, deberías sentir el progreso poco a poco, y esperamos que el incremento de la dificultad entre los ejercicios nunca sea tan grande como para frustrarte.
4543
4644
Haz clic en `next` arriba de estas instrucciones para empezar con el primer ejercicio...

exercises/00-welcome/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We are very excited to have you here! 🎉 😂
88

99
## 💬 Fundamentals:
1010

11-
During this course you will be learning the following concepts:
11+
During this course, you will be learning the following concepts:
1212

1313
1. **Using JSX**: A great syntax proposed by Facebook that mixes HTML and JS in the same file to help you write dynamic HTML.
1414

@@ -34,11 +34,11 @@ During this course you will be learning the following concepts:
3434

3535
Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
3636

37-
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) :computer: (idea) 🤔, (build-tests) :warning:, (pull-request-review) :eyes: (build-tutorial) :white_check_mark: (documentation) :book:
37+
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅, (documentation) 📖
3838

39-
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribution: (coder), (build-tests) :warning:
39+
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribution: (coder) 💻, (build-tests) ⚠️
4040

41-
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (translator) :earth_africa:
41+
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (translator) 🌍
4242

4343
This project follows these specifications: [all-contributors](https://github.com/kentcdodds/all-contributors)
4444

exercises/01-hello-world/README.es.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `01` Hello world
1+
# `01` Hello World
22

33
El mayor dolor de cabeza de los desarrolladores front-end es **trabajar con el DOM** para crear HTML dinámico, lo cual es algo que React.js hace mucho mejor.
44

@@ -14,24 +14,24 @@ La función `ReactDOM.render` recibe dos parámetros:
1414

1515
Por ejemplo:
1616

17-
```js
18-
import React from 'react'; //importar la librería de react
19-
import ReactDOM from 'react-dom'; //importar react-dom para que react genere el html
17+
```jsx
18+
import React from 'react'; // importar la librería de react
19+
import ReactDOM from 'react-dom'; // importar react-dom para que react genere el html
2020

21-
// QUE: esta variable contiene todo el HTML que va a ser renderizado
21+
// QUÉ: esta variable contiene todo el HTML que va a ser renderizado
2222
let output = <span>James is 12 years old</span>
2323

24-
// DONDE: Un elemento DOM que contendrá todo el html generado por react
24+
// DÓNDE: Un elemento del DOM que contendrá todo el html generado por react
2525
const myDiv = document.querySelector('#myDiv');
2626

27-
//qué //dónde
27+
//qué //dónde
2828
ReactDOM.render(output, myDiv);
2929
```
3030

3131
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`:
3232

33-
```js
34-
//Así lo harías sin react
33+
```jsx
34+
// Así lo harías sin react
3535
myDiv.innerHTML = '<span>James is 12 years old</span>';
3636

3737
// Así se hace con react
@@ -44,7 +44,7 @@ ReactDOM.render(<span> James is 12 years old </span>, myDiv);
4444

4545
2. Cambia la variable `output` por:
4646

47-
```js
47+
```jsx
4848
<span>James is <strong>12</strong> years old</span>
4949
```
5050

exercises/01-hello-world/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Today's biggest pain for front-end developers is **working with the DOM** to cre
88

99
React.js is a rendering library made to optimize the DOM: developers save time and the browser is faster.
1010

11-
The library comes with a function called **ReactDOM.render** that you can see as a replacement for the classic [innerHTML property](https://www.w3schools.com/jsref/prop_html_innerhtml.asp)
11+
The library comes with a function called **ReactDOM.render** that you can see as a replacement for the classic [innerHTML property](https://www.w3schools.com/jsref/prop_html_innerhtml.asp).
1212

1313
The `ReactDOM.render` function receives two parameters:
1414

@@ -18,27 +18,27 @@ The `ReactDOM.render` function receives two parameters:
1818

1919
For example:
2020

21-
```js
22-
import React from 'react'; //import the react library
23-
import ReactDOM from 'react-dom'; //import react-dom to make react generate html
21+
```jsx
22+
import React from 'react'; // import the react library
23+
import ReactDOM from 'react-dom'; // import react-dom to make react generate html
2424

25-
// WHAT: This variable contains all the HTML that will be rendered
25+
// WHAT: This variable contains all the html that will be rendered
2626
let output = <span>James is 12 years old</span>
2727

2828
// WHERE: A DOM element that will contain the entire react generated html
2929
const myDiv = document.querySelector('#myDiv');
3030

31-
//what //where
31+
//what //where
3232
ReactDOM.render(output, myDiv);
3333
```
3434

3535
The function `ReactDOM.render` will set the innerHTML of `myDiv` (a DOM element) to be whatever the variable `output` contains, very similar to how `innerHTML` works:
3636

37-
```js
38-
//This is how you would do it without react.
37+
```jsx
38+
// This is how you would do it without react
3939
myDiv.innerHTML = '<span>James is 12 years old</span>';
4040

41-
// This is not you would do it with react.
41+
// This is how you would do it with react
4242
ReactDOM.render(<span> James is 12 years old </span>, myDiv);
4343
```
4444

exercises/01-hello-world/app.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React from "react"; //Main React.js library
1+
import React from "react"; // Main React.js library
22

3-
import ReactDOM from "react-dom"; //we use ReactDOM to render into the DOM
3+
import ReactDOM from "react-dom"; // We use ReactDOM to render into the DOM
44

5-
// WHAT: This variable returns contains the html to render
5+
// WHAT: This variable contains the html to render
66
let output = <span>James is 12 years old</span>;
77

88
// WHERE: A DOM element that will contain the entire react generated html
99
const myDiv = document.querySelector("#myDiv");
1010

11-
//what //where
11+
//what //where
1212
ReactDOM.render(output, myDiv);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
4+
// If we have a variable
5+
let age = "12";
6+
let name = "John";
7+
8+
// We can use it in our html like this
9+
let output = (
10+
<span>
11+
James is <strong>12</strong> years old
12+
</span>
13+
);
14+
15+
// Use react-dom to render it
16+
ReactDOM.render(output, document.querySelector("#myDiv"));

exercises/01.1-hello-jsx/README.es.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ let output = <span> James is { age } years old </span>
1414

1515
Fíjate en la posición de las llaves `{` y `}` envolviendo la variable.
1616

17-
Después, podemos renderizar todo en contenido en el sitio web usando `ReactDOM.render` así:
17+
Después, podemos renderizar todo en contenido en el sitio web usando `ReactDOM.render` así:
1818

1919
```jsx
20-
// usa react-dom para renderizarlo en el DOM
20+
// Usa react-dom para renderizarlo en el DOM
2121
import ReactDOM from 'react-dom';
2222
//renderizar output //dentro del innerHTML de #myDiv
2323
ReactDOM.render(output, document.querySelector('#myDiv'));
@@ -39,4 +39,4 @@ El archivo app.jsx tiene una variable llamada `name` que puede contener un nombr
3939

4040
## 📝 Instrucciones:
4141

42-
1. Por favor, incluye esa variable dentro del resultado(output) de react, reemplaza la variable por el `James`.
42+
1. Por favor, incluye esa variable dentro de la variable `output`. Reemplaza la palabra `James` con la nueva variable `name` (recuerda usar las llaves `{}`).

exercises/01.1-hello-jsx/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ tutorial: "https://www.youtube.com/watch?v=Wp8hcH8jScQ"
44

55
# `01` Hello JSX
66

7-
JSX also allows you to easily include variables into your HTML, for example, lets assume that you have the following variable available:
7+
JSX also allows you to easily include variables into your HTML. For example, let's assume that you have the following variable available:
88

99
```js
1010
let age = 12;
1111
```
1212

13-
If you want to include the value of that variable into your HTML code dynamically, you can do it like this:
13+
If you want to include the value of that variable dynamically into your HTML code, you can do it like this:
1414

1515
```jsx
1616
let output = <span> James is { age } years old </span>
1717
```
1818

1919
Note the position of the curly brackets `{` and `}` wrapping the variable.
2020

21-
Then, we can render the everything in the website content using `ReactDOM.render` like this:
21+
Then, we can render everything in the website content using `ReactDOM.render` like this:
2222

2323
```jsx
24-
// use react-dom to render it into the DOM
24+
// Use react-dom to render it into the DOM
2525
import ReactDOM from 'react-dom';
2626
//render output //inside the innerHTML of #myDiv
2727
ReactDOM.render(output, document.querySelector('#myDiv'));
@@ -43,4 +43,4 @@ The app.jsx file has a variable called `name` that can contain a name.
4343

4444
## 📝 Instructions:
4545

46-
1. Please include that variable inside the react output replace the hard coded word `James` with the variable name (remember the curly brackets `{}`).
46+
1. Please include that variable inside the `output` variable. Replace the hardcoded word `James` with the `name` variable (remember the curly brackets `{}`).

exercises/01.1-hello-jsx/app.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from "react";
22
import ReactDOM from "react-dom";
33

4-
// if we have a variable
4+
// If we have a variable
55
let age = "12";
66
let name = "John";
77

8-
// we can use it in our html like this
8+
// We can use it in our html like this
99
let output = <span>James is {age} years old</span>;
1010

11-
// use react-dom to render it
11+
// Use react-dom to render it
1212
ReactDOM.render(output, document.querySelector("#myDiv"));
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
4+
// If we have a variable
5+
let age = "12";
6+
let name = "John";
7+
8+
// We can use it in our html like this
9+
let output = (
10+
<span>
11+
{name} is {age} years old
12+
</span>
13+
);
14+
15+
// Use react-dom to render it
16+
ReactDOM.render(output, document.querySelector("#myDiv"));

0 commit comments

Comments
 (0)