React 19 adds APIs for asynchronous reads, form actions, and document metadata. The examples below separate React features from framework-specific conventions and show the details needed to use them correctly.

Reading a Promise with use

use reads a Promise's resolved value during rendering. While it is pending, the component suspends. Pass a stable Promise rather than creating a new request on every client render.

import { Suspense, use } from "react";

function UserProfile({ userPromise }) {
  const user = use(userPromise);
  return <h2>Hello, {user.name}</h2>;
}

// userPromise is supplied by the caller and reused across renders.
export function ProfilePage({ userPromise }) {
  return (
    <Suspense fallback={<p>Loading profile…</p>}>
      <UserProfile userPromise={userPromise} />
    </Suspense>
  );
}

Use an Error Boundary to handle rejected Promises. use reads the resource; it does not turn an arbitrary component into an async function.

Form actions with useActionState

The action receives the previous state first and the form data second. The third returned value indicates whether the action is pending.

This standalone demonstration validates the input and updates the displayed state. It does not send a message to a server.

"use client";

import { useActionState } from "react";

async function validateMessage(previousState, formData) {
  const message = String(formData.get("message") ?? "").trim();
  if (!message) return "Please enter a message.";
  return `Message ready: ${message}`;
}

export function ContactForm() {
  const [state, action, isPending] = useActionState(validateMessage, "");

  return (
    <form action={action}>
      <label htmlFor="message">Message</label>
      <input id="message" name="message" required />
      <button type="submit" disabled={isPending}>Validate message</button>
      <p role="status">{state}</p>
    </form>
  );
}

For a real submission, connect the action to your application service, handle failures, and validate on the server too.

Document metadata uses HTML elements

React 19 supports rendering <title>, <meta>, and <link> elements in components and placing the appropriate metadata in the document head.

export function ArticleHeader({ title, description }) {
  return (
    <>
      <title>{title}</title>
      <meta name="description" content={description} />
      <h1>{title}</h1>
    </>
  );
}

React does not export a Metadata type or consume a Next.js-style export const metadata object. Those conventions belong to Next.js, not React itself.

Server Components depend on the application setup

Server Components can perform server-side work and pass serializable data to client components. They require a compatible framework or build integration; installing React 19 alone does not turn a browser-only application into a Server Components application.

Before adopting the APIs

Check your framework's supported React version, distinguish server and client execution, and test loading, failure, and submission states. These are API examples for React 19 projects; they do not require this portfolio itself to run React 19.

References