@RazaAbbas62
Posted
Hi, it looks good, but without the repo URL, I couldn't check your code.
One suggestion is to handle cases where a country has no information like borders or other details, and display suitable information in those cases. For example, Antarctica doesn't have such detailed information, and the page shows a loading spinner. I had a similar issue with mine but realized that later
Enjoy coding :)
@abimh66
Posted
Thanks for the feedback, here is the repo https://github.com/abimh66/rest-countries @FazeenIjaz
@RazaAbbas62
Posted
@abimh66
Your code is well-structured. Consider improving error handling by displaying user-friendly messages. Add comments for better readability. Ensure consistent formatting, provide clearer loading feedback. Validate data existence before accessing properties using optional chaining and nullish coalescing. Remove any unused imports for a cleaner codebase. Consider optimizing API requests, like batching border country requests, for better performance.