Deviopath › React
Easy · Conditional Rendering
The ItemList component receives an items array.
ItemList
items
If the array has items, render them as <li> elements inside a <ul>. If it is empty, render <p>No items yet.</p> instead (and no <ul>).
<li>
<ul>
<p>No items yet.</p>
Next: Counter