useFormStatus
The useFormStatus hook lets a component read the submission status of the <form> it is rendered inside — without threading a pending prop through the tree. It must be called from a component nested within the form, not the one that renders the form. Below, both the submit button and the textarea subscribe to the same form's status independently: the button shows a spinner and the field greys out while the server action runs.