This project is part of the Codevixens Frontend Development Challenge (Day 6). A simple weather app built using React. It demonstrates how to integrate with a weather API, manage state, and design a user-friendly interface.
- API Integration: Fetches weather data from the OpenWeatherMap API.
- State Management: Uses React's
useStatehook to manage the input city, fetched weather data, and error messages. - User Interface: Provides an input field for city name, a button to fetch weather, and a display area for weather information.
- Error Handling: Handles invalid city names and API errors with appropriate feedback to the user.
- Geolocation: Allows users to fetch weather data based on their current location.
- Weather Icons: Displays relevant weather icons based on the weather description.
- Bootstrap Styling: Uses Bootstrap for a visually appealing and responsive UI.
- Modal Alerts: Displays alerts in a modal for user feedback.
- Clone the repository:
git clone https://github.com/gideonagyage/Weather-App.git- Navigate to the project directory:
cd Weather-App- Install dependencies:
npm install- Start the development server:
npm start- Open your browser and navigate to
http://localhost:3000.The WeatherApp component is the main component that handles the following:
- Input Handling: Manages the user's input city name.
- API Calls: Fetches weather data from the OpenWeatherMap API based on the input city or the user's location.
- State Updates: Updates the state with fetched weather data, errors, and loading status.
- UI Rendering: Renders the input field, button, weather information, and error messages.
- Desktop Screenshot
- Mobile Screenshot
Check out the live demo here.
- API Integration: Connecting your application to external services using APIs.
- State Management: Managing the data and UI state of your React application.
- UI Design: Creating a user-friendly and visually appealing interface.
- Error Handling: Gracefully handling errors and providing appropriate feedback to the user.
- Geolocation: Using the browser's geolocation API to access the user's location.
Feel free to fork this repository and submit pull requests. Any contributions are welcome!
This project is licensed under the MIT License.
- Codevixens for organizing the challenge.
- Chinaza Igboanugo, Lois Bassey, and Oyinkansola Shoroye for their contributions and guidance.
Feel free to customize it further to fit your needs! If you have any specific details you'd like to add or change, let me know.

