This is a solution to the REST Countries API challenge on Frontend Mentor and Full Stack Open.
<img loading="lazy" src="..." />
Search bar with icon inside:
<div class="flex items-center">
<span class="material-icons">search</span>
<input
class="bg-transparent focus:outline-none"
placeholder="Search" type="text"
/>
</div>
Add floating point to big number for readability.
<p>Population: {country.population.toLocaleString()}</p>
Handle display to array that can either be empty or have multiple value.
<p>Capital: {country.capital?.join(", ") || "None"}</p>