Introduction to ReactJS Components
This module introduces the core React concepts that power your Weather App. You'll learn how we structure the app using components, manage state with hooks like useState and useEffect, handle user input and events, and fetch real-time weather data from an external API. By the end of this module, you’ll understand exactly how your weather app works under the hood.
Understanding Components in React
In React, components are the heart of your UI. They break your app into reusable, independent pieces. In our weather app, we use both:
- App.js – the main component that controls overall app logic.
- WeatherCard.js – a child component that receives weather data via props and displays it with stylized visuals.
Each component is written as a JavaScript function that returns JSX — a syntax that looks like HTML but works inside JavaScript.


