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

Rest countries api

P
Cris Crawford• 190

@cmcrawford2

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


React router was the way to go. I also used a custom hook from useContext to make a context provider so that I only had to load the country array once and then could access it from any component. I would appreciate anyone taking a look at the code and letting me know what I could have done better. I think the React code is pretty good, but the css is mediocre.

Community feedback

P
Cris Crawford• 190

@cmcrawford2

Posted

I just realized that the back button or the browser back loses the filter and just shows all the countries again. Also, going back from a country selected by a border country button just goes back to the home page. I have to add some router code to fix this.

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