JSX Variables & Nested Elements
The simplest application is the variables. As explained in the previous chapter, we can store HTML elements into JavaScript variables. We can also store more complicated items like lists that include nested elements.
const element = <div>
<h1>Heading</h1>
<p>This is a paragraph. </p>
</div>
Task
Create a variable called myList and store an unordered list inside it. The list should have four list items having inner HTML equal to Item 1, Item 2, Item 3 and Item 4 respectively.
¡Gracias por tus comentarios!
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Can you show me how to create the `myList` variable with the unordered list?
What does the code for the unordered list look like in JSX?
Can you explain how to nest list items inside the unordered list in a variable?
Genial!
Completion tasa mejorada a 2.7
JSX Variables & Nested Elements
Desliza para mostrar el menú
The simplest application is the variables. As explained in the previous chapter, we can store HTML elements into JavaScript variables. We can also store more complicated items like lists that include nested elements.
const element = <div>
<h1>Heading</h1>
<p>This is a paragraph. </p>
</div>
Task
Create a variable called myList and store an unordered list inside it. The list should have four list items having inner HTML equal to Item 1, Item 2, Item 3 and Item 4 respectively.
¡Gracias por tus comentarios!