Front-End mentor project for rest maps API😊👍

Overview

REST Countries API with color theme switcher

Solution for a challenge from frontendmentor.io.



About The Project

If you're wanting to test your JavaScript skills this is the challenge for you. Use whichever JS framework you prefer and pull data from the REST Countries API. The challenge is to integrate with the REST Countries V2 API to pull country data and display it like in the designs. You can use any JavaScript framework/library on the front-end such as React or Vue. You also have complete control over which packages you use to do things like make HTTP requests or style your project.

Users should be able to:
1. See all countries from the API on the homepage.
2. Search for a country using an input field.
3. Filter countries by region.
4. Click on a country to see more detailed information on a separate page.
5. Click through to the border countries on the detail page.
6. Toggle the color scheme between light and dark mode (optional).

I do not have access to the Figma sketch so the design is not pixel perfect.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flex
  • Desktop-first workflow
  • React
  • Rest Countries API

What I learned

Another fun project to practice React along with API. I have worked with other API however mostly with static urls. This one was a bit harder because I had to change request depending on the input as well. I am currently working on filterting by region. I did make it work however I had to change some tags to make options field editable, another new thing I found out recently. Instead of changing it via JS I tried to change to list tags but instead the functionality stopped working. Another hard thing I did not manage yet, is changing country borders. The URL I am getting request from is giving me country code names instead of full name and I am unsure how to change it back to full name. I also finally started to understand how to use states depending whether it's a class or function component!

Useful resources

  1. Figma - Paste your design image to check the size of containers, width, etc.
  2. Perfect Pixel - Awesome Chrome extension that helps you to match the pixels of the provided design.
  3. Rest Countries API - information about countries via a RESTful API
  4. Framer Motion - React library for animations

Acknowledgments

A big thank you to anyone providing feedback on my solution. It definitely helps to find new ways to code and find easier solutions!

You might also like...

Second-challinge - Frontend Mentor - Social proof section

Second-challinge - Frontend Mentor - Social proof section

Frontend Mentor - Social proof section Welcome! 👋 Thanks for checking out this

Feb 8, 2022

Frontend Mentor - E-commerce product page solution

Frontend Mentor - E-commerce product page solution

Frontend Mentor - E-commerce product page solution This is a solution to the E-commerce product page challenge on Frontend Mentor. Frontend Mentor cha

Nov 2, 2022

Mentor(a): Michelle Hanne

Mentor(a): Michelle Hanne

Secretum Chat Developed by Tessera. Índice Introdução Recursos Comentários Desenvolvedores Processo de compilação Tecnologias Login Screen / Signup Sc

Jun 20, 2022

Complete Open Source Front End Candy Machine V2 Minter dAPP Built For The Frog Nation NFT Solana Project. Built With React, Candy Machine V2, Typescript

Complete Open Source Front End Candy Machine V2 Minter dAPP Built For The Frog Nation NFT Solana Project. Built With React, Candy Machine V2, Typescript

Complete Open Source Front End Candy Machine V2 Minter dAPP Built For The Frog Nation NFT Solana Project. Built With React, Candy Machine V2, Typescript

Sep 24, 2022

The Backed Beans project front-end. Completed.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Apr 27, 2022

📈 This project was developed for the XP Inc front-end technical challenge

📈 This project was developed for the XP Inc front-end technical challenge

Desafio técnico PSel - Turma XP 🚀 Esse projeto tem como objetivo desenvolver um aplicativo de investimento em ações, com algumas funcionalidades de c

Aug 11, 2022

Atividade do Módulo 03 - Especialização em Front-end - Turma 01; Criação de uma API de Rick and Morty com React.js.

Atividade do Módulo 03 - Especialização em Front-end - Turma 01; Criação de uma API de Rick and Morty com React.js.

Screenshots Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you

Dec 1, 2021

A landing page, as well as a results page, that utliize both Yelp API and Google Maps API.

A landing page, as well as a results page, that utliize both Yelp API and Google Maps API.

Economic Eats Group Project #1 Maintained By: Austin Donovan John Hysong John Guzzetta Jahnathan Exantus Description This project contains a landing p

Aug 4, 2022

A Travel companion app using Google Maps API, Travel Search and Weather API

A Travel companion app using Google Maps API, Travel Search and Weather API

Travel Advisor Introduction An advanced Travel Companion Application using Google Maps. With Geolocation, Google Maps API, Searching for places, Fetch

Nov 11, 2022
Owner
Ashutosh Mohanty
- Web Developer Lead GDSC | Contributor @ GWOC'21 | Web Developer (Life is a source code!! It's always you, who will decide what you have to do with it👍)
Ashutosh Mohanty
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
It consists of a recreation of Twitter, to put into practice both Front-end and Back-end knowledge by implementing the MERN Stack together with other technologies to add more value to the project.

Twitter-Clone_Back-end ✨ Demo. ?? About the project. ?? Descriptions. It consists of a recreation of Twitter, to put into practice knowledge of both F

Mario Quirós Luna 5 Apr 12, 2022
It consists of a recreation of Twitter, to put into practice knowledge of both Front-end and Back-end implementing the MERN Stack along with other technologies to add more value to the project.

Twitter-Clone_Front-end ✨ Demo. Login Home Profile Message Notifications Deployed in: https://twitter-clone-front-end.vercel.app/ ?? About the project

Mario Quirós Luna 5 Jun 26, 2022
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
End-to-End type safety for REST APIs written in Fastify. Only problem is you have to explicity export and register route handlers. LOL

Chino intelligence in japaneese End-to-End type safety for REST APIs written in Fastify. Only problem is you have to explicity export and register rou

sambit sahoo 2 Sep 12, 2022
Pass trust from a front-end Algorand WalletConnect session, to a back-end web service

AlgoAuth Authenticate to a website using only your Algorand wallet Pass trust from a front-end Algorand WalletConnect session, to a back-end web servi

Nullable Labs 16 Dec 15, 2022
Web-Technology with Aj Zero Coding. In this tutorial we learn front-end and back-end development.

Installation through NPM: The jQWidgets framework is available as NPM package: jQuery, Javascript, Angular, Vue, React, Web Components: https://www

Ajay Dhangar 3 Nov 19, 2022
Sample project to demonstrate Playwright Test usage, pointing to ServeRest API and Front-end

demo-playwright-test This is a sample project to demonstrate Playwright Test usage, running tests against ServeRest API and Front-end. Pre-requisites

Stefan Teixeira 30 Oct 24, 2022