Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

First attempt at REST Countries API Challenge using React

react, fetch
Gareth Carter•235
@gcarter89
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


This is my first attempt at this challenge.

I think my main aim in the next attempt is to separate out the components even more.

I've deviated from using the v2 API and used the newer version of the REST Countries API instead.

I think there are a few things to improve which I'll add in my future attempts:

  1. Better error handling when I get a bad request from the API not related to my query.
  2. Using localstorage to store the dark mode preference.
  3. Using media queries to load preferences?

Anyway, let me know what you think and what I could do to improve the app!

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 Gareth Carter'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
  • Use cases

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