Skip to content

RS-Arafath/Simple-React-Rest-Contries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

React + Vite

๐ŸŒ React Rest Countries Explorer

A modern, responsive web application that fetches data from the Rest Countries API to display information about countries worldwide. Users can explore country details, mark countries as visited, and toggle their status.

๐Ÿš€ Live Demo

Check out the live deployment here: Simple React Rest Countries


โœจ Features

  • Data Fetching: Dynamically fetches country data (flags, names, codes) using the Rest Countries API.
  • Visited List: Users can add countries to a "Visited" list.
  • Toggle Logic: Efficiently add or remove countries from the visited list with a single button click (Toggle functionality).
  • Responsive Design: Optimized for mobile, tablet, and desktop views.
  • Interactive UI: Smooth state management using React Hooks.

๐Ÿ› ๏ธ Technologies Used

  • React.js (Functional Components, Hooks)
  • JavaScript (ES6+)
  • Rest Countries API
  • CSS3 / Tailwind CSS
  • Netlify (For Deployment)

๐Ÿ“– Lessons Learned (Deep Dive)

During this project, I deepened my understanding of:

  1. React State Management: Handling arrays and objects within useState.
  2. Conditional Logic: Implementing toggle features using .find() and .filter() methods to avoid duplicate data.
  3. API Integration: Using useEffect to fetch and display asynchronous data.
  4. Immutability: Learning why we must create new arrays (using the spread operator or filter) instead of mutating the original state.

โš™๏ธ Installation & Setup

If you want to run this project locally:

  1. Clone the repository:
    git clone [https://github.com/your-username/your-repo-name.git](https://github.com/your-username/your-repo-name.git)
    
    ---

Developed with โค๏ธ by Arafath

About

๐ŸŒ Explore the world with React! A simple yet powerful app to browse countries, view details, and track visited places using the Rest Countries API. Built with React.js and modern CSS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors