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

Nextjs, TypeScript & Tailwind CSS

Franco shum• 130

@Francoshum95

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


Optimizing performance is a key challenge in this project.

To address this, I implemented caching to reduce the number of API calls and a hash map to improve efficiency. I stored the countries data in localStorage, as the country data does not frequently change.

To further optimize memory usage, I used a .map() function to remove unnecessary fields from the data and created a hash map to store a pair of country code and country name for use in the border countries on the country page.

I welcome any code review or feedback to improve the performance of this implementation. Thank you.

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