How ritesh23s/react-weather works
WeatherNow is a React weather dashboard. A user searches for a city (or selects a recent search); App fetches current conditions and forecast data from OpenWeather, then renders current, hourly, and weekly views. The dashboard also provides unit and theme controls plus persistent search history. The graph reflects the sampled runtime code and README capabilities; mock mode is documented, but its implementation was not present in the sampled App excerpt, so it is not mapped as a verified flow.
Main entry points: App.jsx Dashboard and search · HourlyForecast.jsx Hourly forecast · WeeklyForecast.jsx Weekly forecast · iconMap.js Weather icon mapping
Components 14
App runtime
- React entry
src/main.jsx - Dashboard and search
src/App.jsx - Dashboard styling
src/styles
Weather views
- Current conditions
src/components/WeatherCard.jsx - Hourly forecast
src/components/HourlyForecast.jsx - Weekly forecast
src/components/WeeklyForecast.jsx
History and preferences
- Search history
src/components/SearchHistory.jsx - Temperature toggle
src/components/TemperatureToggle.jsx - Theme toggle
src/components/ThemeToggle.jsx
Display helpers
- Weather icon mapping
src/utils/iconMap.js - Temperature conversion
src/utils/tempConvert.js
Other components
- Weather app user
- OpenWeather API
- Browser localStorage
Connections 19
- Weather app user → React entry: opens dashboard
src/main.jsx - React entry → Dashboard and search: renders
src/main.jsx - Weather app user → Dashboard and search: searches city
src/App.jsx - Dashboard and search → OpenWeather API: fetches weather and forecast
src/App.jsx - Dashboard and search → Browser localStorage: loads and saves preferences
src/App.jsx - Dashboard and search → Current conditions: renders current data
src/App.jsx - Dashboard and search → Hourly forecast: renders forecast data
src/App.jsx - Dashboard and search → Weekly forecast: renders forecast data
src/App.jsx - Dashboard and search → Search history: renders and supplies callbacks
src/App.jsx - Search history → Dashboard and search: invokes selection or delete callback
src/components/SearchHistory.jsx - Dashboard and search → Temperature toggle: renders unit control
src/App.jsx - Dashboard and search → Theme toggle: renders theme control
src/App.jsx - Theme toggle → Browser localStorage: reads and saves theme
src/components/ThemeToggle.jsx - Current conditions → Weather icon mapping: maps condition icon
src/components/WeatherCard.jsx - Hourly forecast → Weather icon mapping: maps condition icons
src/components/HourlyForecast.jsx - Hourly forecast → Temperature conversion: converts temperatures
src/components/HourlyForecast.jsx - Weekly forecast → Weather icon mapping: maps condition icons
src/components/WeeklyForecast.jsx - Weekly forecast → Temperature conversion: converts temperatures
src/components/WeeklyForecast.jsx - Dashboard and search → Dashboard styling: imports dashboard styles
src/App.jsx