FrontendIntermediatev19.0Updated 2026-07

React.js

The library for web and native user interfaces

JavaScriptUISPASSRJSXHooks

Overview

  • 1React 19 (stable Dec 2024) is the most significant release since hooks in v16.8.
  • 2React Compiler automatically optimises re-renders — useMemo and useCallback are rarely needed.
  • 3Server Components are now a first-class pattern; forms use server Actions natively.
  • 4The new `use()` hook reads promises and context inside render without boilerplate.
  • 5Document metadata (`<title>`, `<meta>`, `<link>`) can be declared inside any component.

Key Features in 19.0

React Compiler (auto-memoization, no manual useMemo/useCallback)
Server Actions — async functions that run on the server from client forms
useActionState hook — tracks form action state (pending, error, data)
useFormStatus — reads the status of a parent <form> action
useOptimistic — optimistic UI updates before server confirmation
use() hook — reads a promise or context value mid-render
Asset preloading APIs — preload, preinit, prefetchDNS

Use Cases

  • Single-page applications (SPAs) with complex state
  • Full-stack apps with Next.js App Router and Server Components
  • Interactive dashboards and data-heavy UIs
  • Cross-platform apps via React Native

What's New in React 19

  • React Compiler (previously React Forget) now ships in production builds
  • Actions API: async transitions that manage pending, error, and optimistic states
  • ref is now a regular prop — forwardRef is deprecated
  • Context.Provider can be written as <Context> instead of <Context.Provider>
  • Cleanup functions for refs (same pattern as useEffect cleanup)
  • Improved hydration error messages show exact diffs between server and client
  • Third-party scripts and stylesheets have first-class Suspense integration

Core Concepts

  • Components as pure functions — same props always produce the same UI
  • Virtual DOM diffing (Fiber architecture) for efficient updates
  • Hooks: useState, useEffect, useRef, useContext, useReducer, useCallback, useMemo
  • Context API for cross-tree state without prop drilling
  • Strict Mode detects side-effects by double-invoking lifecycle methods in dev
  • Concurrent features: useTransition, useDeferredValue, Suspense boundaries

Server Components & Server Actions

  • Server Components run only on the server — zero JS sent to client by default
  • Can directly access databases, file systems, and secrets without API layers
  • Server Actions: `"use server"` directive marks async functions for server execution
  • Forms post to Server Actions natively — no fetch() or event handlers required
  • Client Components (`"use client"`) hydrate and enable interactivity
  • Composing server and client components: server wraps client, passes serialisable props

Performance Optimisation

  • React Compiler eliminates most manual memo/callback calls automatically
  • useTransition marks non-urgent state updates — keeps UI responsive
  • useDeferredValue defers expensive computations until higher-priority work is done
  • React.lazy + Suspense for code-splitting and dynamic imports
  • Virtualisation libraries (react-window, TanStack Virtual) for long lists
  • React DevTools Profiler identifies commit durations and wasted renders

Ecosystem & Tooling

  • Next.js 15 — full-stack React framework with App Router, Turbopack, and PPR
  • Remix / React Router v7 — nested routing and server-side data loading
  • Vite — fastest local dev server for CSR React apps
  • TanStack Query — server state, caching, synchronisation
  • Zustand / Jotai — lightweight client state management
  • Radix UI + shadcn/ui — accessible headless component system

Frequently Asked Questions

What is new in React 19?

React 19 introduces the React Compiler (automatic memoisation), Server Actions for form handling, new hooks (useActionState, useFormStatus, useOptimistic), the use() hook for reading promises mid-render, and native document metadata support inside components.

Do I still need useMemo and useCallback in React 19?

In most cases, no. The React Compiler automatically inserts memoisation where needed. Manual useMemo and useCallback are still valid for complex cases the compiler cannot handle, but routine usage is no longer necessary.

What are React Server Components?

React Server Components (RSC) are components that render exclusively on the server. They have no JavaScript bundle sent to the client, can directly access databases and file systems, and compose seamlessly with Client Components that add interactivity.

React vs Vue vs Angular — which to choose in 2026?

React dominates the job market and ecosystem (Next.js, Remix). Vue offers a gentler learning curve with excellent DX. Angular suits large enterprise teams with strict TypeScript needs. React is the safest general-purpose choice; Vue is ideal for teams new to frameworks; Angular for complex monorepo enterprise apps.