JavaScript Library

What is React

Meta's component-based UI library — the most widely used way to build interactive web interfaces.

Official site

Overview

React is a JavaScript library for building user interfaces out of composable components. It is deliberately narrow in scope: it handles the view and its state, and leaves routing, data fetching and build tooling to the surrounding ecosystem or a meta-framework like Next.js.

That focus, plus a massive ecosystem and Meta's backing, made React the default choice for a huge share of the web. Modern React centres on function components, hooks, and increasingly server components for rendering work that happens before code reaches the browser.

What it is

React lets you describe UI as a function of state. You compose components, manage state with hooks, and React efficiently updates the DOM when that state changes. It is a library, not a full framework — you assemble the rest.

  • Function components and hooks (useState, useEffect, and friends)
  • Server Components and Suspense for server-first rendering
  • The largest UI ecosystem in JavaScript

When we reach for it

React is our go-to when a client wants the largest possible hiring pool and library ecosystem, or when we build on top of Next.js. It shines for highly interactive product UIs where flexibility matters more than built-in structure.

Trade-offs

React gives you freedom and therefore decisions: routing, state management, data fetching and build setup are all choices you make (or inherit from a meta-framework). Two React codebases can look nothing alike, so conventions and discipline matter more than with Angular.

Why it matters

React is the most widely-used front-end library in the world, created by Meta for building user interfaces from reusable components. It matters because it defined the modern component-based approach to UI and has a vast ecosystem — meta-frameworks (Next.js, Remix), component libraries, tooling and a huge talent pool — which makes it a safe, well-supported default for building anything from a widget to a large application. Its flexibility is both its strength and its trade-off: React does one thing (render UI) well and leaves the rest to you or to the ecosystem.

  • The most widely-used front-end library, created by Meta
  • Defined component-based UI; has a vast ecosystem and talent pool
  • Flexible: does UI rendering well, leaves other choices to you/the ecosystem

Key characteristics

React builds UIs from components — self-contained, reusable pieces that describe what to render for a given state — and efficiently updates the DOM when state changes (historically via a virtual DOM). It is a library, not a full framework, so routing, data fetching, SSR and state management come from the ecosystem or a meta-framework rather than React itself. That flexibility means you (or your chosen meta-framework) make architectural decisions React does not impose. Modern React has evolved significantly with hooks and, increasingly, Server Components that shift rendering work to the server.

  • Builds UIs from reusable, state-driven components
  • A library, not a framework — routing/data/SSR come from the ecosystem
  • Meta-frameworks (Next.js, Remix) add the structure React omits
  • Modern React: hooks and Server Components move work to the server

When to use it

React is a reasonable default for most front-end work because of its ecosystem, flexibility and hiring pool — but for anything beyond a small widget, you almost always use it via a meta-framework (Next.js, Remix) that provides routing, server rendering and structure, which is also what makes a React site SEO-friendly. Raw client-side React (like a create-react-app SPA) risks the indexation problems of any client-only app, so for content or marketing sites, reach for a meta-framework with SSR/static rendering. Choose React when you want flexibility and ecosystem depth; pair it with a meta-framework for structure and SEO.

  • A sensible default given ecosystem, flexibility and hiring
  • Use it via a meta-framework (Next.js/Remix) for structure and SSR
  • Client-only React risks the SEO issues of any SPA
  • Pick React for flexibility; add a meta-framework for SEO and structure

Common questions

React — questions

Straight answers on how this fits your marketing and build.

Is React a framework?
Not strictly — React is a UI library focused on the view layer. You add routing, data fetching and tooling yourself, or adopt a meta-framework like Next.js that bundles those decisions for you.
React or Angular?
React offers more flexibility and a bigger ecosystem; Angular gives you more structure and typing out of the box. We choose based on team size, how opinionated the client wants the codebase, and whether SSR via Next.js is in play.
Is React bad for SEO?
Raw client-side React can be, because content rendered only in the browser may not be reliably indexed. But React used through a meta-framework like Next.js — with server-side or static rendering — produces fully-rendered HTML that crawlers see, making it SEO-friendly. The key is server or static rendering, which is exactly what those frameworks add.
Is React a framework or a library?
A library — it focuses on rendering user interfaces from components and deliberately leaves routing, data fetching, server rendering and state management to you or to the surrounding ecosystem. Meta-frameworks like Next.js and Remix wrap React with those capabilities to provide the full framework experience.

Still have questions? Talk to a specialist