The submit button needs to know if the form is submitting. Threading isPending down from the parent works, but it's noise. useFormStatus reads it from the enclosing form directly.
The shape
const { pending, data, method, action } = useFormStatus(). Inside a component rendered inside a <form action={fn}>, the hook reports the form's current submission state. The most-used field is pending.
The boundary rule
useFormStatus reads the nearest enclosing form. It works only in components rendered as descendants of that form. Calling it in a sibling or parent returns the default (pending: false).
The composition win
Before useFormStatus, a custom <SubmitButton> needed a prop: <SubmitButton isPending={isPending}>. With useFormStatus, the button reads the status itself. The parent renders <SubmitButton /> and the button stays in sync with whichever form it lands inside.
The data field
While a submit is in flight, data contains the submitted FormData. You can use it to show an optimistic preview of what's being submitted ('Saving title: My New Title...'). Pairs naturally with useOptimistic (next lesson).