Skip to content

gunash-portfolio/weather-app-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

Screenshot Screenshot The Weather App is a simple React application that allows users to fetch and display weather information for multiple cities using the OpenWeatherMap API. Users can also delete weather cards for specific cities.

Features

  • Fetch weather data for multiple cities using the OpenWeatherMap API.
  • Display city names and temperatures in Celsius.
  • Delete weather cards for specific cities.

Getting Started

To run the Weather App locally on your machine, follow the steps below:

  1. Clone this repository to your local machine using Git:
git clone https://github.com/your-username/weather-app.git

2.Navigate to the project directory:

cd weather-app
  1. Install the required dependencies using npm:
npm install
  1. Get your OpenWeatherMap API key:

  2. Sign up for a free account on OpenWeatherMap (https://openweathermap.org/).

  3. Obtain your API key from the dashboard.

  4. Replace YOUR_OPENWEATHERMAP_API_KEY in src/api.js and src/App.js with your actual API key.

  5. Run the development server: npm start.

  6. Open your web browser and visit http://localhost:3000 to access the Weather App.

Usage

  1. Enter the name of a city in the input field.
  2. Click the "Get Weather" button to fetch weather information for the specified city.
  3. The app will display the city name and temperature in Celsius.

Components

App

The App component is the main component of the Weather App. It handles fetching weather data, displaying weather cards, and managing delete functionality.

API

The fetchWeatherData function in the api.js file is responsible for making API requests to OpenWeatherMap to retrieve weather data.

Technologies Used

  • React (Create React App),
  • HTML/CSS,
  • OpenWeatherMap API,

Credits

  • Weather data is fetched from the OpenWeatherMap API (https://openweathermap.org/).
  • This project was created as part of a learning exercise.

License

This project is licensed under the MIT License. License: MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published