Built-in React DOM HooksLink for this heading

January 6, 2025 · View on GitHub

The react-dom package contains Hooks that are only supported for web applications (which run in the browser DOM environment). These Hooks are not supported in non-browser environments like iOS, Android, or Windows applications. If you are looking for Hooks that are supported in web browsers and other environments see the React Hooks page. This page lists all the Hooks in the react-dom package.


Forms let you create interactive controls for submitting information. To manage forms in your components, use one of these Hooks:

  • useFormStatus allows you to make updates to the UI based on the status of the a form.
function Form({ action }) {

  async function increment(n) {

    return n + 1;

  }

  const [count, incrementFormAction] = useActionState(increment, 0);

  return (

    <form action={action}>

      <button formAction={incrementFormAction}>Count: {count}</button>

      <Button />

    </form>

  );

}

function Button() {

  const { pending } = useFormStatus();

  return (

    <button disabled={pending} type="submit">

      Submit

    </button>

  );

}

NextuseFormStatus


Copyright © Meta Platforms, Inc

no uwu plz

uwu?

Logo by@sawaratsuki1004

Learn React

Quick Start

Installation

Describing the UI

Adding Interactivity

Managing State

Escape Hatches

API Reference

React APIs

React DOM APIs

Community

Code of Conduct

Meet the Team

Docs Contributors

Acknowledgements

More

Blog

React Native

Privacy

Terms

On this page


React

v19

Search⌘CtrlK

Learn

Reference

Community

Blog

Is this page useful?

API Reference