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 GitHubJoin 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