Giter Club home page Giter Club logo

emanuelmarques45 / rest-countries Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 195 KB

Web app made with ReactJS to search countries and see their information

Home Page: https://rest-countries-tau-nine.vercel.app

License: Apache License 2.0

HTML 2.33% TypeScript 97.67%
api react typescript api-rest react-hooks react-router-dom reactjs restful-api styled-components styled-components-react styled-components-theme framer framer-motion react-router theme-switcher typescript-react vite font-awesome react-query react-select

rest-countries's Introduction

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.

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

Screenshots

Desktop Layout

Desktop

Desktop

Mobile Layout

Mobile

Mobile

Links

My process

Built with

What I learned

I learned how to use react query to make HTTP requests (which is much more simple than making requests manually), and used react select for the first time to use a custom select input.

To see how you can add code snippets, see below:

function getAllCountries() {
  return useQuery('getAllCountries', async () => {
    return await fetch(`https://restcountries.com/v3.1/all`).then(data =>
      data.json()
    )
  })
}

const { data, isLoading } = getAllCountries()

Useful resources

Author

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.