react.dev
react.dev copied to clipboard
[Typo]: useActionState reference page doesn't include `isPending` return, and is only used with forms
trafficstars
Summary
Hello 👋
- useActionState should return
[state, formAction, isPending], not just[state, formAction] - The doc make it unclear if we can actually use this hook outside of a form, there are only examples about using it in a form and the second item in the return is
formAction, but the author of the hook specified it should not always be the case
Page
https://19.react.dev/reference/react/useActionState#returns
Details
No response
can I work on this if it valid