What Is React, and Why Does Everyone Build Components?
React lets you build a UI out of small, reusable pieces instead of one giant tangle of markup and jQuery.
React lets you build a UI out of small, reusable pieces instead of one giant tangle of markup and jQuery.
JSX looks like HTML but it is JavaScript underneath, and composing small components is how every React app is built.
Props flow data down into a component; state is the memory a component keeps for itself and can change over time.
Almost every real UI is a list of something — this is how React renders arrays and reacts to clicks and input.
useEffect is how a component reaches outside itself — timers, subscriptions, and fetching data from a real backend.
A complete, working todo app built from scratch — the classic first real React project, done properly.
A second real project: a small weather dashboard that searches a city and fetches live results from an external API.