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

Responsive Rest Countries page built with React, Axios and React Route

@CharlesDesiderio

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


The only thing I didn't really manage to do was getting the full names of the neighboring countries, since it would require a separate API call for each one to get the full name. I was able to make a list of API links for each country, but was just not having any luck iterating through them all. I'll have to go back and read more on async/await and promises, but if anyone has an elegant solution, I'm happy to hear it.

Community feedback

P
Matt Studdert 13,611

@mattstuddert

Posted

Hey Charles, great work on this challenge. One way of getting the neighbouring country names would be to loop through the array of all the countries using .map() and create a new array consisting of the border countries with their name and alphaCode as properties. This would avoid API calls for each country.

Have a look into that, but let me know if you have any questions 👍

0

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