Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 2.25 KB

README.md

File metadata and controls

60 lines (42 loc) · 2.25 KB

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 (optional)

Links

My process

Built with

  • Semantic HTML5 markup
  • Tailwindcss
  • Flexbox
  • CSS Grid
  • Mobile-first workflow (Well I forgot this but tailwind saved me :>)
  • Next.js - React framework

What I learned

Using react-query was quite a challenge. specially in Next.js because I needed to somehow manage using Server Components and Client Components. thankfully react-query already has a solution for this. I'm not sure though if this is a good use if you need to load a long list like I did here in home page.
I also used shadcn/ui for some ui components like dropdown and select which saved some time. althogh required some theming.
I learned about next-theme package which provides theme context and saves a lot of time.

Useful resources

Author