Skip to content

cmcrawford2/rest-countries-api

Repository files navigation

Frontend Mentor - REST Countries API with color theme switcher solution

This is a solution to the REST Countries API with color theme switcher challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • See all countries from the API on the homepage
  • Search for a country using an input field
  • Filter countries by region
  • Click on a country to see more detailed information on a separate page
  • Click through to the border countries on the detail page
  • Toggle the color scheme between light and dark mode

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • React - JS library
  • React router - React framework

What I learned

I learned how to use the useContext hook to be able to initialize and access the countries array from other modules.

Continued development

Some of my css is still a bit wonky. For example, the desktop country detail page doesn't maintain proper balance between the flag and info when I expand or contract the window. There are also a few bits of css that I don't really understand. ChatGPT made suggestions and I implemented some of them, but there were one or two that I didn't understand.

Author

Acknowledgments

ChatGPT 3.5 was very helpful.

About

rest-countries-api challenge from frontendmentor.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published