Find your country using react single page app
Design comparison
Solution retrospective
This project is a new learning curve for the. Because in the earlier project, I did not work with the API with this much data and also toggle between the light and the dark mode. I think on the react-routing part I can do it better. Feel free to give feedback on the solution.
Community feedback
- @F4YYPosted over 1 year ago
Hi @NikhilKDhande,
Congratulations for completing the challenge...
However, something's missing. Border country button couldn't be clicked to go to respective country detail card.
Perhaps that's happened due to use of
loose equality (==)
when comparing values in JavaScript (countryDetails.borders[i] and allCountrydata[j].cca3). Usingstrict equality (===)
is generally considered safer because it avoids potential pitfalls and ensures more predictable behavior. It helps prevent unintended type conversions and promotes code clarity.Above all you did very great. Hope that's could be helpful. Keep happy coding...
Marked as helpful0
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