@vatsalsinghkv
Posted
It's nice but it's slow like while searching for a country. How'd you manage to get border countries name
@sqle157
Posted
@vatsalsinghkv Hi, thank you for your feedback!
The searching depends on the fetch request so I'm not sure if I can speed that up. For the border name, I used the api endpoint where you can fetch country by country code and return the name of the country according to that border code.
I hope this answers your question!
@vatsalsinghkv
Posted
@sqle157 well I faced the same challenge so to speed up I fetched every country data and while searching for it I didn't make and http request and even when country is visited. Thanks I really liked your idea of getting border names but wouldn't that make your app slow?
@sqle157
Posted
@vatsalsinghkv It would, but to make up for it, I make a Spinner so it will appear to be loading for data everytime you visit the country detail page.
It will increase the user experience and doesn’t make the app looks slow. When users use the app, the spinner will give them the feel that the app is loading, not just some instant view of the page.
In the end, it depends on how you handle the challenge and how to make the UX better with your solution.
I know my solution is not the most appropriate one, but I hope this can give you some inspiration on coding this challenge.