CodingNic

Build the Current Weather Experience

Pass Weather Data into `CurrentWeather`

Build the Current Weather Experience 10 min read

Pass Weather Data into `CurrentWeather`

Task

Connect the existing current-weather component to the stored response.

File / section

src/App.jsx and src/components/CurrentWeather.jsx

Change

Render <CurrentWeather weather={weather} unit={unit} /> inside the weather content when weather exists. Keep the component focused on presentation.

Why this change matters

Props make the data dependency explicit: CurrentWeather does not need to know how the API request happened.

Test it

Search for a valid city and confirm the city name and current condition appear.

Checkpoint

The current-weather card receives live API data.