Home / React / Lesson 1

What React is (and is not)

Beginner 8 min read Lesson 1 of 11

React is a JavaScript library for building user interfaces, started at Meta and now used across the industry. It is not a programming language, not a database, and not a replacement for HTML and CSS. You still write JavaScript; React gives you a way to split the UI into components that update when data changes.

The problem it solves

With only the DOM APIs (document.querySelector, innerHTML), a todo list or a dashboard quickly becomes a tangle of event listeners that forget to update some part of the page. React’s model is: UI = function(state). You describe what the screen should look like for the current data; React updates the DOM to match.

Core ideas (accurate, not slogans)

When you do not need React

A college portfolio, a static notes page, or a GPA calculator like the one on this site can be HTML, CSS and a little JavaScript. React pays off when the UI has lots of interactive state, lists that change, or a team that wants reusable components. Jumping to React before you can use the DOM and fetch makes debugging harder, not easier.

This course uses function components and hooks (the current standard). Class components still work in React 18/19 but new code should not start there.

Next: install a real toolchain with Vite — Create React App is retired.