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 with color theme switcher (React with hooks)

@mrphemi

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

Community feedback

P
Matt Studdert 13,611

@mattstuddert

Posted

Awesome work on this challenge Kayode, it looks great and functions really well. How did you get on with the challenge? Did you learn anything new while going through it?

Keep up the great work!

0

P
Matt Studdert 13,611

@mattstuddert

Posted

@mrphemi nice! Yeah, hooks and context are great additions to React. I know about CSS Modules, but have never actually used them in a project. I'll take another look at your styles to get a better understanding of it. I've always used Styled Components with React apps and have always found it really nice to work with.

0

@mrphemi

Posted

@mattstuddert Thanks for the feedback matt. I used functional components and useState and useContext hooks for state management. I also used CSS modules for styles. I learned that stateless functional components are easier to read and understand and they also help reduce codebase with relatively fewer lines of code compared to class-based components. I also learned that context API is a perfect go-to for state management for small to medium-sized apps rather than bringing in an external library like redux.

0

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