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.
Grazie per i tuoi commenti!
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Mi faccia domande su questo argomento
Riassuma questo capitolo
Mostri esempi dal mondo reale
Awesome!
Completion rate improved to 2.7
JSX Variables & Nested Elements
Scorri per mostrare il menu
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.
Grazie per i tuoi commenti!