This is a countries website created as a personal project using React. The website fetches data from an external API using the Fetch API and displays a list of countries. When the user clicks on a country, the flag and some details of the country are shown. Additionally, there is an input field where the user can type the name of a country and get the same details.
- Fetches country data from an external API.
- Displays a list of countries with their flags.
- Shows details of a selected country upon clicking.
- Includes an input field for searching countries by name.
- Responsive design for use on various devices.
You can view a live demo of the countries website here.
To run the project locally:
- Clone this repository.
- Navigate to the project directory.
- Install dependencies using
npm install
. - Start the development server using
npm run dev
. - Hold Ctrl and click on the localhost url to open the website in the browser
The countries website is built using React, leveraging the Fetch API to fetch data from the REST Countries API. The fetched data is then displayed dynamically on the website. When a user clicks on a country or searches for a country by name, the relevant details are fetched and displayed.