React.js

React is a JavaScript library for building UIs from components. How it works, React 19, Server Components, the Compiler and why Create React App is out.

What is React?

React is a JavaScript library for building user interfaces out of components. You describe what the screen should look like for the current state, and React updates the page when that state changes. It runs in the browser, on the server, and on phones through React Native. React 19 is the current major version, and 19.3 was released in September 2026 according to react.dev.

How React works

A component is a piece of the UI with its own logic and appearance, and React components are JavaScript functions that return markup. That markup is usually written in JSX, which is optional but used by most React projects. State lets a component remember information, and calling the setter returned by useState makes React render the component again with the new value.

function Counter() { const [count, setCount] = useState(0); return <button onClick={() => setCount(count + 1)}>Clicked {count} times</button>; }

React in 2026

  • Server Components: stable in React 19. They render ahead of time, either once at build time or for each request, in an environment separate from the browser. Their code stays out of the client bundle and only the rendered output reaches the client. A 'use client' directive marks the interactive parts. You normally use them through a framework.
  • React Compiler: version 1.0 shipped on October 7, 2025. It is a build-time tool that adds automatic memoization to components and hooks, and it is compatible with React 17 and up.
  • Create React App is deprecated: the React team deprecated it on February 14, 2025, because it has no active maintainers. For new apps they recommend a framework such as Next.js, React Router or Expo, or a build tool such as Vite, Parcel or Rsbuild. Their rule of thumb: if your app needs routing, a framework will probably help.

Where React runs

Common mistakes

  • Starting a new project with Create React App, which is deprecated.
  • Mutating state directly instead of passing a new value to the setter.
  • Rendering lists without stable key values.
  • Using effects to compute values that could be calculated while rendering.
  • Adding manual memoization everywhere before measuring anything. The Compiler now covers much of this.
  • Shipping a client-only SPA with a large bundle and ignoring first load.

React and performance testing

A load test sends traffic to your servers and APIs. It does not execute your React code, so it cannot show slow rendering or an oversized bundle. Measure that in a real browser: the free Core Web Vitals checker reports field data for a URL, and page speed monitoring runs scheduled Lighthouse audits and alerts you on regressions. The APIs your components call are a separate question, and API monitoring checks them from outside. For deeper reading, see our guides on JavaScript performance and frontend performance testing.

FAQ

Is React a library or a framework?

React is usually called a library for building user interfaces. It does not include routing or data fetching, which is why the React team recommends starting new apps with a framework such as Next.js, React Router or Expo.

Is Create React App still recommended?

No. It was deprecated on February 14, 2025 and remains in maintenance mode. Use a framework or a build tool like Vite for new projects.

What are React Server Components?

Components that render ahead of time on a build server or on each request, so their code is not sent to the browser. They are stable in React 19 and are normally used through a framework.

Do I need the React Compiler?

No, it is optional. It automatically memoizes components and hooks at build time, which can replace much manual memoization. Version 1.0 is stable and works with React 17 and up.

What is the current version of React?

React 19 is the current major version. The latest release listed on react.dev is 19.3.0, from September 9, 2026.

How fast is your website?

Elevate its speed and SEO seamlessly with our Free Speed Test.

Free Website Speed Test

Analyze your website's load speed and improve its performance with our free page speed checker.