Design comparison
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!
Community feedback
- @maakosu2Posted over 1 year ago
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 helpful1 - @zubyCharlesPosted over 1 year ago
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 helpful1@CodeyBrodeyPosted over 1 year ago@zubyCharles Thanks a bunch! I was not able to figure out why that was happening. Now it is working as it should be.
0
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