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.
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
- Solution URL: Solution on github
- Live Site URL: Country picker
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- React - JS library
- React router - React framework
I learned how to use the useContext hook to be able to initialize and access the countries array from other modules.
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.
- Website - Cris Crawford
- Frontend Mentor - @cmcrawford2
ChatGPT 3.5 was very helpful.