chore(i18n,curriculum): processed translations (#42721)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a24c314108439a4d4036160
|
||||
title: Define an HTML Class in JSX
|
||||
title: Define una clase HTML en JSX
|
||||
challengeType: 6
|
||||
forumTopicId: 301393
|
||||
dashedName: define-an-html-class-in-jsx
|
||||
@@ -8,27 +8,27 @@ dashedName: define-an-html-class-in-jsx
|
||||
|
||||
# --description--
|
||||
|
||||
Now that you're getting comfortable writing JSX, you may be wondering how it differs from HTML.
|
||||
Ahora que te sientes cómodo escribiendo JSX, te preguntarás cuanto difiere de HTML.
|
||||
|
||||
So far, it may seem that HTML and JSX are exactly the same.
|
||||
Hasta ahora, puede parecer que HTML y JSX son exactamente iguales.
|
||||
|
||||
One key difference in JSX is that you can no longer use the word `class` to define HTML classes. This is because `class` is a reserved word in JavaScript. Instead, JSX uses `className`.
|
||||
Una diferencia clave en JSX es que ya no puedes usar la palabra `class` para definir clases HTML. Esto es debido a que `class` es una palabra reservada en JavaScript. En su lugar, JSX utiliza `className`.
|
||||
|
||||
In fact, the naming convention for all HTML attributes and event references in JSX become camelCase. For example, a click event in JSX is `onClick`, instead of `onclick`. Likewise, `onchange` becomes `onChange`. While this is a subtle difference, it is an important one to keep in mind moving forward.
|
||||
De hecho, la convención de nomenclatura para todos los atributos HTML y referencias a eventos en JSX se convierte a camelCase. Por ejemplo, un evento de clic en JSX es `onClick`, en lugar de `onclick`. Del mismo modo, `onchange` se convierte en `onChange`. Si bien se trata de una diferencia sutil, es importante tenerlo en cuenta de ahora en adelante.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Apply a class of `myDiv` to the `div` provided in the JSX code.
|
||||
Aplica una clase `myDiv` al `div` proporcionado en el código JSX.
|
||||
|
||||
# --hints--
|
||||
|
||||
The constant `JSX` should return a `div` element.
|
||||
La constante `JSX` debe devolver un elemento `div`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(JSX.type, 'div');
|
||||
```
|
||||
|
||||
The `div` should have a class of `myDiv`.
|
||||
`div` debe tener una clase `myDiv`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(JSX.props.className, 'myDiv');
|
||||
|
Reference in New Issue
Block a user