REST Countries API using React.js | React-Router | Radix UI
Design comparison
Solution retrospective
I utilized the react-router-dom and it's hooks like useParams
and useSearchParams
to be able to pass data to another page using loader
and implemented searchParam
to store value in URL while using it as a useState
for input and other.
Practiced with .filter
method for filtering list and Object
function to extract values from API data.
Thanks to @AlexMarshall he helped me solving the border countries and displaying it by names using Destructure Assignment []
for targeting single array value then fetching borders data.
I got the double tab bug fixed by implementing a Timeout
delayed function for toggling open state true
& false
Any feedback on improving is very welcome :)
Community feedback
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