The challenge was to with the REST Countries API to pull country data and get it looking as close to the design as possible.
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)
I've just learnt NextJS and TypeScript and I'm getting better with React and Chakra-UI, so this was an opportunity to take on an ADVANCED challenge on Frontend Mentor and really put my skills to the test. It was challenging I must say, I learnt a lot of new concepts and approaches. This particular challenge had a completion rate of ~12% on Frontend Mentor at the time I attempted it, glad I'm now part of the 12% that were able to see it through to the end 😄
REACTJS
as the JavaScript Frontend Library of choice so I could practice and solidify my knowledge of some important React Hooks likeuseState
anduseEffect
.NextJS
as the React Framework of choice so I could practice what I've learnt onServer Side Rendering
,Route Pre Fetching
and also get familiar with using it withTypeScript
. I also learnt to use thegetServerSideProps
function.- I used asynchronous
fetchAPI
to pull data from the REST Countries API and performed necessary manipulation on the data received to achieve desired results. Here I learnt more about adn improved myJavaScript
skills on handling ddeply nestedObjects
. - Chakra-UI was used as the UI component library of choice. It's great for creating simple, modular, and accessible React components.
The project was deployed on Vercel the creator of NextJS for a seemless and stress-free deployment process. Here is Live Link.