Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Rest Countries API build with React, Typescript, Tailwind, Vite

react, tailwind-css, typescript, vite, jest
Richard•320
@riwepo
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


Hi, I would love some feedback on this project.

The parts I found the hardest -

  • setting up Vite for the first time there are lots of bits to get right
  • writing tests for the parsing of the JSON input from the RestCountries API while using Typescript, where the incoming data is of unknown type
  • what behaviors to implement for the search input

I have one specific question - I implemented 'dark mode' with Tailwind. It worked perfectly on my desktop but on my mobile the dark and light themes were reversed i.e. the colors were dark when dark-mode was off and vice versa. No idea why???

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Hugo Albuquerque•160
    @HugoAlbuquerque1993
    Posted over 1 year ago

    Maybe it's because you're collecting the device's theme preference. If you are not doing this, I suggest you start doing it to try to solve the problem.

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
Frontend Mentor logo

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub