WeatherApp is a cross-platform application built with React Native and Redux for state management. It allows users to search for weather information of various cities and stores the search history using localStorage. The app is designed to work seamlessly on both web and mobile platforms.
- Search Weather Information: Search for current and forecast weather data by city.
- View Weather Data: Display current and forecast weather information.
- Search History: Store and display previously searched cities using localStorage.
- Quick Access: Display buttons for previously searched cities below the input field on initial load for quick access.
- React Native: Used for building the mobile version of the application.
- React Native Web: Extends the same codebase to run seamlessly in web browsers using a custom Webpack configuration.
- TypeScript: Ensures type safety across the application, enhancing maintainability and developer productivity.
- Redux: Manages the application's state in a predictable manner across different environments.
- Axios: Handles HTTP requests to the OpenWeatherMap API, ensuring efficient data retrieval.
- Expo for running the app on mobile devices
- Node.js installed on your machine
- Expo Go app installed on your mobile device (available on Google Play and App Store)
-
Clone the repository:
git clone https://github.com/yourusername/WeatherApp.git cd WeatherApp -
Install the dependencies:
npm install
npx webpack servenpm startYou will see a QR code displayed in the terminal. Open the Expo Go app on your mobile device and scan the QR code to load the app.
- Open the application on your desired platform (web or mobile).
- Use the input field to search for a city's weather information.
- Below the input field, buttons representing previously searched cities will appear.
- Click on any of these buttons to quickly fetch the weather information for that city.