Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

React, React-Router, vanilla css, typescript REST Countries

accessibility, react, typescript, react-router
Fernando A. Malfavón•370
@Wlfernando
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 made the select from scratch, it is not perfect but it emulate close the real one (I hope so), it just have some details that I would continue working in new projects or continue in this one. I implemented the transitions over the flags between routes. I feel I did good the theme color with the variables css and detect the os preference color.

Edited: I added a Debounce class with typescript and I learned a lot implementing the types using constraints and generics!

What challenges did you encounter, and how did you overcome them?

It was interesting to experiment with react-router avoiding to catch the data fetched from the api and when to revalidate it.

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

I got problems with some flags to transition correctly. I think it could be related to the special symbols on the names but I didn't see the difference when I activated the anchor to transition. The file is Card.tsx

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 Fernando A. Malfavón'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