Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

A small React app that shows the current weather for any city, built with React + Vite and the free Open-Meteo API (no API key required).

Features

  • Search weather by city name
  • Displays temperature, condition, humidity, and wind speed
  • Remembers your last 5 searches (saved in localStorage)
  • Clean, responsive UI with plain CSS

Tech / concepts used

  • useState for form input, loading, error, and result state
  • useEffect for syncing recent searches to localStorage
  • Two chained API calls (geocoding → forecast) using fetch and async/await
  • Conditional rendering for loading / error / result states

Getting started

git clone <your-repo-url>
cd weather-app
npm install
npm run dev

Then open the local URL Vite prints (usually http://localhost:5173).

Build for production

npm run build
npm run preview

Why Open-Meteo?

It's free, requires no API key or sign-up, and has generous CORS support — which makes it easy to call directly from the browser without a backend or hidden secrets, ideal for a public front-end-only project.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages