This is a solution to the REST Countries API with color theme switcher challenge on Frontend Mentor.
- REST Countries API with color theme switcher
- Frontend Mentor - REST Countries API with color theme switcher
The challenge is to integrate with the REST Countries V2 API to pull country data and build out the project to the designs inside the /design
folder.
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)
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-responsive workflow
- React Router
- React - JS library
- Styled Components - For styles
Some of my major learnings while working through this project.
- Async thunk
- RTQ query
useEffect(() => {
const timeoutId = setTimeout(() => {
if (searchQuery) dispatch(filterCountry(searchQuery));
}, 700);
//clean up - runs on every rerender
return () => {
clearTimeout(timeoutId);
};
}, [searchQuery]);
- Email - [email protected]
- Twitter - @ceonyema_
- LinkedIN - @emmanuel-c-onyema
- Frontend Mentor - @cemmanuelonyema
There is also a style-guide.md
file containing the information you'll need, such as color palette and fonts.
- Netlify was used for deployment - Netlify
- Email - [email protected]
- Twitter - @ceonyema_
- LinkedIN - @emmanuel-c-onyema
🚀