Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Countries traverse and filter with REACT and CSS flex-box

Muhammad Faizan• 210

@mohammadfaizan410

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


Handling 404 responses for getting specific countries with their names. Tried using useEffect and displaying an empty array if a country was not found. Continuing typing after a country was not found made multiple 404 responses which made the website lag a lot. Finally ended up just filtering through the local array of all the countries that I get in the start since the array size is fixed this is not much of an issue, I suppose.

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord