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 using NextJS

@EduardIonescu

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


Hi, this challenge was pretty tough.

  • The first page loads quite slowly, so maybe it could be better to only show 50 countries and have a Load more button at the bottom.
  • The data has a lot of information that I don't use, so maybe just grabbing only what I need would've been somewhat better.

Other than that, I'm happy with how the app works. getStaticProps and getStaticPaths make the individual country pages load fast, but I've had some issues in development when I tried to use getStaticProps in the homepage.

Community feedback

@Djarma12

Posted

The solution is great, I would add only one suggestion, and that is when you call the data from the api for the first time, to save it in some array, so that you don't have to call it all the time. The application would work much faster and there would be no waiting for the request when we want to return from the page about the details of a specific country because the data about the countries would already be in a row, there would be no request again.

Marked as helpful

1

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