Lesson 3
Component Communication (useFormStatus)
Deep State Access
The Shift: You have a SubmitButton nested deep in a form. In React 18, you had to pass loading props down 5 levels. In React 19, the child can "ask" the parent form if it's busy.
👀 Preview
The SubmitButton automatically knows when the form is submitting, without any props being passed down.
📚 Explanation
`useFormStatus` allows child components to access the pending state of their parent form without prop drilling. The hook automatically connects to the nearest form ancestor and provides the pending status.
App.tsx
How well did you remember this?