Rest Countries API

Solution retrospective
I am not sure about the way to handle the country flag image, I like to use a div as a container to handle that, but this time it seems a little bit tricky.
I used vite with vue3 + vue-router + typescript to build the app, used the <Transition> component to show animation, and used an experimental component called <Suspense> to display the skeleton loading animation while the data stilling fetching.
When fetching the API in async, the most interesting and challenging part is the border countries, since the API only gives me a string that looks like country code "AND" or something, I need to use it to fetch data once again and return an array as the final result I want.
If anyone has a better solution on handle images and getting border countries' names, please let me know, thanks!!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Danny Wen's solution.
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