Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

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

Richard 320

@riwepo

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

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???

Community feedback

@HugoAlbuquerque1993

Posted

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.

1

Please log in to post a comment

Log in with GitHub
Discord logo

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