REST Countries Solution

Solution retrospective
Hello Coders!
Lots of learning with this one. If anyone cares to leave feedback look specifically for React, fetching, search-bar errors or optimization as these were the things i was most uncomfortable with.
Thanks for the attention. Happy coding!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @maakosu2
the API has country names in lowercase, and you use the string function to LowerCase() to convert your input on the search bar Element and use the Inculde function of the array function to filter, you check out my code of this implementation, I will have to work with you on this, kind regards
Marked as helpful - @zubyCharles
When you try to find a country by entering it’s name in the search bar, no result is returned unless the entire input is in lowercase. This is because the names of the countries are stored in lowercase in the json returned by the API call. So ensure you convert your input value to lowercase before comparing with the country.name.common property for the search functionality.
Marked as helpful
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