Skip to content

Commit 2d71793

Browse files
Merge pull request 4GeeksAcademy#86 from Lorenagubaira/reactex.03.2-6
03.2-06 README´s were changed
2 parents 1fd35e9 + 64a5f17 commit 2d71793

File tree

21 files changed

+130
-118
lines changed

21 files changed

+130
-118
lines changed

exercises/03.2-a-real-component/README.es.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `03.2` Un componente real
1+
# `03.2` A real component
22

3-
En el ejericio anterior hemos creado nuestro primer componente llamado **PrintHello** y hemos aprendido que podemos usar el componente como una etiqueta HTML.
3+
En el ejericio anterior hemos creado nuestro primer componente llamado **PrintHello**, y hemos aprendido que podemos usar el componente como una etiqueta HTML.
44

55
```jsx
66
<PrintHello />
@@ -18,13 +18,12 @@ Ahora, vamos a crear un nuevo componente (función) llamado **`<BootstrapCard />
1818
</div>
1919
</div>
2020
```
21-
🔎
22-
Este código HTML está basado en la [Bootstrap Card](https://getbootstrap.com/docs/4.0/components/card/).
21+
Nota: Este código HTML está basado en la [Bootstrap Card](https://getbootstrap.com/docs/4.0/components/card/).
2322

2423
## 📝 Instrucciones:
2524

2625
1. Por favor, crea una función llamada `BootstrapCard` que devuelva el código de la card y usa la función `ReactDOM.render` para añadir `<BootstrapCard />` dentro del sitio web, dentro de `#myDiv`.
2726

2827
## 💡 Pista:
2928

30-
* Si no sabes o no recuerdas cómo usar `ReactDOM.render`, puedes revisar los ejercicios anteriores.
29+
+ Si no sabes o no recuerdas cómo usar `ReactDOM.render`, puedes revisar los ejercicios anteriores.

exercises/03.2-a-real-component/README.md

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

55
# `03.2` A real component
66

7-
In the past exercise we created our first component called **`PrintHello`** and we learn that we can use the component like an HTML tag.
7+
In the past exercise we created our first component called **`PrintHello`**, and we have learned that we can use the component like an HTML tag.
88

99
```jsx
1010
<PrintHello />
@@ -23,12 +23,12 @@ Now let's create another component (function) called **`<BootstrapCard />`** tha
2323
</div>
2424
```
2525

26-
> 🔎 This HTML code its based on the [Bootstrap Card](https://getbootstrap.com/docs/4.0/components/card/).
26+
Note: This HTML code its based on the [Bootstrap Card](https://getbootstrap.com/docs/4.0/components/card/).
2727

28-
## 📝 Instructions
28+
## 📝 Instructions:
2929

3030
1. Please create a function called `BootstrapCard` that returns the card code and use the `ReactDOM.render` function `<BootstrapCard />` to add it into the website inside `#myDiv`.
3131

3232
## 💡 Hint:
3333

34-
* if you don't know or remember how to use `ReactDOM.render` you can review the past exercises.
34+
+ If you don't know or remember how to use `ReactDOM.render` you can review the past exercises.

exercises/03.3-component-properties/README.es.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# `03.3` Propiedades de un componente
1+
# `03.3` Component Properties
22

3-
La BootstrapCard que acabas de hacer está [hard coded](https://es.quora.com/Qu%C3%A9-significa-en-computacion-hard-coded) para **Bob Dylan** únicamente.
3+
La `BootstrapCard` que acabas de hacer está [hard coded](https://es.quora.com/Qu%C3%A9-significa-en-computacion-hard-coded) para **Bob Dylan** únicamente.
44

5-
Pero, ¿qué pasa si queremos reutilizar el componente `<BootstrapCard />` para **Paul Mccartney** o cualquier otra persona? ¿Cómo podriamos hacer? ¡Usar propiedades!
5+
Pero, ¿qué pasa si queremos reutilizar el componente `<BootstrapCard />` para **Paul Mccartney** o cualquier otra persona? ¿Cómo podriamos hacer? ¡Usa propiedades!
66

77
## Usando propiedades en HTML
88

@@ -15,11 +15,11 @@ Cuando usas la etiqueta **anchor** (`<a>`) tienes que especificar la propiedad *
1515
<a href="http://twitter.com">Take me to twitter</a>
1616
```
1717

18-
🔎 Aquí estoy reutilizando la etiqueta de enlace(<a>) en dos enlaces diferentes
18+
Nota: Aquí estoy reutilizando la etiqueta de enlace (`<a>`) en dos enlaces diferentes
1919

2020
> Usando propiedades en React.js
2121
22-
> En React.js también podemos crear nuestras propias etiquetas y usar nuestras propias propiedades inventadas. Por ejemplo, podríamos especificar la propiedad `title` de nuestra `<BootstrapCard />` de esta forma:
22+
En React.js también podemos crear nuestras propias etiquetas y usar nuestras propias propiedades inventadas. Por ejemplo, podríamos especificar la propiedad `title` de nuestra `<BootstrapCard />` de esta forma:
2323

2424
```jsx
2525
//para Paul Mccartney
@@ -41,7 +41,9 @@ const BootstrapCard = (props) => {
4141
}
4242
```
4343

44-
Para trabajar con propiedades de componentes, tienes que especificar qué propiedades recibirá el componente (nombre y tipo de dato de cada propiedad), [puedes leer más sobre las prop-types aquí](https://reactjs.org/docs/typechecking-with-proptypes.html). e.g:
44+
Para trabajar con propiedades de componentes, tienes que especificar qué propiedades recibirá el componente (nombre y tipo de dato de cada propiedad), [puedes leer más sobre las prop-types aquí](https://reactjs.org/docs/typechecking-with-proptypes.html).
45+
46+
Por ejemplo:
4547

4648
```js
4749
// aquí estamos especificando que este componente recibirá la propiedad "title" y será un string.
@@ -54,14 +56,14 @@ BootstrapCard.propTypes = {
5456

5557
1. Por favor, agrega/usa las propiedades `imageUrl`, `description`, `buttonUrl` y `buttonLabel` dentro de la función `BootstrapCard` y también en la etiqueta `<BootstrapCard />` (Con la información de Bob Dylan que trae por defecto). Hazlo de la misma manera en que `title` ha sido incluida en ambas.
5658

57-
## 💡 Pista:
59+
## 💡 Pistas:
5860

59-
* Tienes que editar 3 partes del archivo (verifica los comentarios para ayudarte).
61+
+ Tienes que editar 3 partes del archivo (verifica los comentarios para ayudarte).
6062

61-
* El primer paso es reemplazar las cosas escritas directamente por las propiedades del componente.
63+
+ El primer paso es reemplazar las cosas escritas directamente por las propiedades del componente.
6264

63-
* El segundo paso es definir esas propiedades en el objeto prop-types en la línea 23, [aquí un video de cómo hacerlo](https://www.youtube.com/watch?v=oty7VGcXK44).
65+
+ El segundo paso es definir esas propiedades en el objeto prop-types en la línea 23, [aquí un video de cómo hacerlo](https://www.youtube.com/watch?v=oty7VGcXK44).
6466

65-
* El tercer paso será usar ReactDOM para añadir la declaración de la etiqueta `<BootstrapCard>` incluyendo las 5 propiedades y sus respectivos valores.
67+
+ El tercer paso será usar ReactDOM para añadir la declaración de la etiqueta `<BootstrapCard>` incluyendo las 5 propiedades y sus respectivos valores.
6668

67-
* No tienes que renderizar el componente muchas veces, solo una.
69+
+ No tienes que renderizar el componente muchas veces, solo una.

exercises/03.3-component-properties/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ But, what if we also want to re-use the same `<BootstrapCard />` component for *
1010

1111
## Using properties in HTML
1212

13-
When you are coding HTML you are constantly using the `<tag>` properties to modify the tag behavior, e.g.:
13+
When you are coding HTML you are constantly using the `<tag>` properties to modify the tag behavior, for example:
1414

1515
When you use the **anchor** tag (`<a>`) you have to specify the **href** property like this:
1616

@@ -19,11 +19,11 @@ When you use the **anchor** tag (`<a>`) you have to specify the **href** propert
1919
<a href="http://twitter.com">Take me to twitter</a>
2020
```
2121

22-
:mag_right: Here I'm re-using the anchor tag for two different links
22+
Note: Here I'm re-using the anchor tag (`<a>`) for two different links
2323

2424
> Using properties in React.js
2525
26-
> In React.js we also can create our own tags and use our own invented properties, for example we could specify the `title` property of our `<BootstrapCard />` like this:
26+
In React.js we also can create our own tags and use our own invented properties, for example we could specify the `title` property of our `<BootstrapCard />`, like this:
2727

2828
```jsx
2929
//for Paul Mccartney
@@ -45,7 +45,9 @@ const BootstrapCard = (props) => {
4545
}
4646
```
4747

48-
To be able to work with component properties, you have to specify what properties the component will receive (the name and data-type of each property), [here you can read more about prop-types](https://reactjs.org/docs/typechecking-with-proptypes.html). E.g:
48+
To be able to work with component properties, you have to specify what properties the component will receive (the name and data-type of each property), [here you can read more about prop-types](https://reactjs.org/docs/typechecking-with-proptypes.html).
49+
50+
For example:
4951

5052
```jsx
5153
// here we are specifying that this component will receive the property "title" and it will be a string.
@@ -58,14 +60,14 @@ BootstrapCard.propTypes = {
5860

5961
1. Please add/use the `imageUrl`, `description`, `buttonUrl` and `buttonLabel` properties inside the `BootstrapCard` function and also on the `<BootstrapCard />` tag (With Bob Dylan's information that has by default). Do it the same way `title` was already included in both.
6062

61-
## 💡 Hint:
63+
## 💡 Hints:
6264

63-
* You have to edit 3 parts of the file (check the comments for help).
65+
+ You have to edit 3 parts of the file (check the comments for help).
6466

65-
* The first step will be to replace the hardcoded stuff with properties inside the component.
67+
+ The first step will be to replace the hardcoded stuff with properties inside the component.
6668

67-
* The second step will be to define those properties in the prop-types object on line 23, [here is a video on how to do it](https://www.youtube.com/watch?v=oty7VGcXK44).
69+
+ The second step will be to define those properties in the prop-types object on line 23, [here is a video on how to do it](https://www.youtube.com/watch?v=oty7VGcXK44).
6870

69-
* The third step will be to use ReactDOM to add the `<BootstrapCard>` tag declaration including the 5 properties and their respective values.
71+
+ The third step will be to use ReactDOM to add the `<BootstrapCard>` tag declaration including the 5 properties and their respective values.
7072

71-
* You don't have to render the component two times, just once.
73+
+ You don't have to render the component two times, just once.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# `03.4` Jumbotron
22

3-
## 📝 Instrucciones:
3+
Usando todo lo que has aprendido...
44

5-
Usando todo lo que has aprendido:
5+
## 📝 Instrucciones:
66

77
1. Construye un componente `Jumbotron` que reciba las siguientes propiedades:
88

@@ -15,7 +15,15 @@ Usando todo lo que has aprendido:
1515
/>
1616
```
1717

18-
Tu componente debería generar un HTML similar a este:
18+
##  Resultado Esperado:
19+
20+
![Jumbotron](../../.learn/assets/03.4-1.png?raw=true)
21+
22+
## 💡 Pistas:
23+
24+
+ Recuerda usar los prop-types para validar las propiedades de tu componente.
25+
26+
+ Tu componente debería generar un HTML similar a este:
1927

2028
```html
2129
<div class="jumbotron m-5">
@@ -24,11 +32,3 @@ Tu componente debería generar un HTML similar a este:
2432
<a class="btn btn-primary btn-lg" href="https://reactjs.org/" role="button">Go to the official website</a>
2533
</div>
2634
```
27-
28-
## 💡 Pista:
29-
30-
* Recuerda usar los prop-types para validar las propiedades de tu componente.
31-
32-
## Resultado Esperado:
33-
34-
![Jumbotron](../../.learn/assets/03.4-1.png?raw=true)

exercises/03.4-jumbotron/README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ tutorial: "https://www.youtube.com/watch?v=zv6HPveyz6g"
44

55
# `03.4` Jumbotron
66

7+
Using everything you have learned so far...
8+
79
## 📝 Instructions:
810

9-
1. Using everything you've learned, build a `Jumbotron` component that receives the following properties:
11+
1. Build a `Jumbotron` component that receives the following properties:
1012

1113
```jsx
1214
<Jumbotron
@@ -16,19 +18,21 @@ tutorial: "https://www.youtube.com/watch?v=zv6HPveyz6g"
1618
buttonURL="https://reactjs.org/"
1719
/>
1820
```
19-
Your HTML's component should be something like this:
21+
22+
## Expected result:
23+
24+
![Jumbotron](../../.learn/assets/03.4-1.png?raw=true)
25+
26+
## 💡 Hints:
27+
28+
+ Remember to use prop-types to validate your component properties.
29+
30+
+ Your HTML's component should be something like this:
2031

2132
```html
2233
<div class="jumbotron m-5">
2334
<h1 class="display-4">Welcome to react</h1>
2435
<p class="lead">React is the most popular rendering library in the world</p>
2536
<a class="btn btn-primary btn-lg" href="https://reactjs.org/" role="button">Go to the official website</a>
2637
</div>
27-
```
28-
## 💡 Hint:
29-
30-
* Remember to use prop-types to validate your component properties.
31-
32-
## Expected result:
33-
34-
![Jumbotron](../../.learn/assets/03.4-1.png?raw=true)
38+
```
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# `03.5` Componente Alert
2-
3-
## 📝 Instrucciones:
1+
# `03.5` Alert Component
42

53
Basándote en el conocimiento que ahora tienes:
64

7-
1. Por favor, crea un componente `<Alert />` que reciba 1 prop `text: Proptype.string` y renderice una [bootstrap alert](https://getbootstrap.com/docs/4.0/components/alerts/#examples) como la siguiente:
8-
9-
## 💡 Pista:
10-
11-
Así es como deberías usar el componente:
5+
## 📝 Instrucciones:
126

13-
```jsx
14-
<Alert text="OMG! Something really bad has happended!" />
15-
```
7+
1. Por favor, crea un componente `<Alert />` que reciba 1 prop `text: Proptype.string` y renderice una [bootstrap alert](https://getbootstrap.com/docs/4.0/components/alerts/#examples) como la siguiente:
168

17-
### Resultado esperado:
9+
## Resultado esperado:
1810

1911
Esto es lo que el componente debería generar en el HTML:
2012

2113
```html
2214
<div class="alert alert-danger" role="alert">
2315
OMG! Something really bad has happended!
2416
</div>
25-
```
17+
```
18+
19+
## 💡 Pista:
20+
21+
+ Así es como deberías usar el componente:
22+
23+
```jsx
24+
<Alert text="OMG! Something really bad has happended!" />
25+
```

exercises/03.5-alert-component/README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,11 @@ tutorial: "https://www.youtube.com/watch?v=80_k11tqhrE"
44

55
# `03.5` Alert Component
66

7-
## 📝 Instructions:
8-
97
Based on the knowledge that you now have:
108

11-
1. Please create an `<Alert />` component that receives 1 prop `text: Proptype.string` and renders a [bootstrap alert](https://getbootstrap.com/docs/4.0/components/alerts/#examples) like the following:
12-
13-
## 💡 Hint:
14-
15-
This is how the component will be used:
9+
## 📝 Instructions:
1610

17-
```jsx
18-
<Alert text="OMG! Something really bad has happended!" />
19-
```
11+
1. Please create an `<Alert />` component that receives 1 prop `text: Proptype.string` and renders a [bootstrap alert](https://getbootstrap.com/docs/4.0/components/alerts/#examples) like the following:
2012

2113
## Expected Result:
2214

@@ -26,4 +18,11 @@ This is What the component should output as HTML:
2618
<div class="alert alert-danger" role="alert">
2719
OMG! Something really bad has happended!
2820
</div>
29-
```
21+
```
22+
## 💡 Hint:
23+
24+
+ This is how the component should be used:
25+
26+
```jsx
27+
<Alert text="OMG! Something really bad has happended!" />
28+
```

exercises/04-conditional-rendering/README.es.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `04` Renderizado condicional
1+
# `04` Conditional Rendering
22

3-
También puedes usar las propiedades de un componente para cambiar su comportamiento, como mostrar u ocultar `<Alert />` según una propiedad llamada `show`.
3+
También puedes usar las propiedades de un componente para cambiar su comportamiento y como mostrar u ocultar `<Alert />`, según una propiedad llamada `show`.
44

55
```jsx
66
{/* Esto hará que tu alerta se muestre */}
@@ -23,13 +23,16 @@ const Alert = (props) => {
2323
};
2424
```
2525

26-
☝️ Devolver distinto código HTML según ciertas condiciones es llamado formalmente [renderizado condicional](https://joshblog.net/2018/conditional-rendering-with-react-and-jsx/).
26+
Nota: ☝️ Devolver distinto código HTML según ciertas condiciones es llamado formalmente [renderizado condicional](https://joshblog.net/2018/conditional-rendering-with-react-and-jsx/).
2727

28-
## 📝 Instrucciones
28+
## 📝 Instrucciones:
2929

3030
1. Crea un componente `<Alert />` que renderice una [bootstrap alert](https://getbootstrap.com/docs/4.0/components/alerts/#examples).
3131

32+
## 💡 Pista:
33+
3234
El componente debe ser capaz de recibir las siguientes dos propiedades:
3335

34-
- show (bool): True or false.
35-
- text (string): El mensaje a incluir dentro del mensaje del `<Alert />`.
36+
+ Show (bool): veradero o falso.
37+
38+
+ Text (string): El mensaje a incluir dentro del mensaje del `<Alert />`.

exercises/04-conditional-rendering/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ const Alert = (props) => {
2727
};
2828
```
2929

30-
☝️ Returning different HTML code based on conditions its formally called [conditional rendering](https://joshblog.net/2018/conditional-rendering-with-react-and-jsx/).
30+
Note: ☝️ Returning different HTML code based on conditions its formally called [conditional rendering](https://joshblog.net/2018/conditional-rendering-with-react-and-jsx/).
3131

3232
## 📝 Instructions:
3333

3434
1. Create an `<Alert />` component that renders a [bootstrap alert](https://getbootstrap.com/docs/4.0/components/alerts/#examples).
3535

36+
## 💡 Hint:
37+
3638
The component must be able to receive the following 2 properties:
3739

38-
- show (bool): True or false.
40+
+ Show (bool): True or false.
3941

40-
- text (string): The message to include inside the alert message
42+
+ Text (string): The message to include inside the alert message.

0 commit comments

Comments
 (0)