Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

REST Countries API using React.js | React-Router | Radix UI

accessibility, react
Mazen Hassan•600
@Mazz100
A solution to the REST Countries API with color theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

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.

What specific areas of your project would you like help with?

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 :)

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Mazen Hassan's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License