What is React?
React's core idea — building UIs out of composable components that describe what the interface should look like for any given state.
2 min read
React is a JavaScript library for building user interfaces, created at Facebook and open-sourced in 2013. It's deliberately not a full framework: React itself only handles rendering components to the DOM and reacting to state changes. Routing, data fetching conventions, and build tooling are left to other libraries (React Router, TanStack Query) or to a framework built on top of React, like Next.js.
The central idea is declarative UI: instead of writing step-by-step instructions for how to update the DOM when data changes (find this element, change its text, toggle that class), you describe what the UI should look like for a given piece of state, and React figures out the DOM updates itself.
function Greeting({ name }) {
return <h1>Hello, {name}!</h1>;
}This function is a component — the fundamental unit of a React application. It takes input (props) and returns a description of UI, written in JSX (JavaScript with HTML-like syntax mixed in, which you'll cover next). React apps are trees of components like this one, nested inside each other.
How React decides what to update
When a component's data changes, React doesn't throw away and rebuild the whole page. It re-runs the component function to get a new description of the UI, compares it against the previous description (a process called reconciliation), and applies only the minimal set of real DOM changes needed. You never call document.querySelector or manually mutate elements — you just describe the current state, and React handles turning that into DOM operations efficiently.
A library, not a framework
Because React only covers the view layer, "a React app" in practice usually means React plus a handful of other choices: a build tool (Vite is the modern default), a router, and often a full framework like Next.js once you need server rendering, file-based routing, or API routes. This is different from Vue or Angular, which ship more of that decision-making built in. It gives you more flexibility, at the cost of more setup decisions early on.
What this course covers
You'll start with JSX and components, move through props and state, cover the Hooks that give function components memory and side effects (useState, useEffect, and others), and finish with patterns like Context and custom hooks that show up in real React codebases. By the end, you'll be able to read and write production React code, not just toy counters.