Foundations

React

A library for building user interfaces from components. You describe UI as a function of state, and React reconciles updates to the DOM.

What it is

React is a JavaScript library focused on the view layer: composable components, declarative rendering, and a predictable update model. It does not dictate routing, data fetching, or build tooling by itself.

Why it matters

It is the default mental model for most modern web and cross-platform UI work. Understanding components, props, state, and effects is baseline for almost every stack that touches a browser or React Native.

When to use it

Use React when you want a component-based UI with a large ecosystem and strong hiring and tooling support. Pair it with a framework or bundler; raw React alone is rarely the whole story for production apps.

How it fits in the stack

It sits in the UI layer above your language (TypeScript/JavaScript) and below routing, rendering policy, and deployment. Frameworks like Next.js or Expo wrap React with opinions about navigation, bundles, and platform APIs.

Common confusion

React is not the same as Next.js. React is the UI library; Next.js is a React framework that adds routing, rendering modes, and conventions. Confusing the two leads to wrong expectations about SSR, file-based routes, and deployment.