react.dev
react.dev copied to clipboard
[Suggestion]: Add `isPending` example to `useActionState` docs
Summary
A section to describe the isPending value you can extract from useActionState
Page
https://react.dev/reference/react/useActionState
Details
You can do const [state, action, isPending] = useActionState(myAction, null); to extract the pending state from useActionState however I can't see an example of this anywhere in the documentation, adding this as an example would be quite useful
Opened https://github.com/reactjs/react.dev/pull/6989 to work on this