reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
11.07k stars 7.55k forks source link

[Typo]: useActionState reference page doesn't include `isPending` return, and is only used with forms #6872

Open poulet42 opened 6 months ago

poulet42 commented 6 months ago

Summary

Hello 👋

  1. useActionState should return [state, formAction, isPending], not just [state, formAction]
  2. 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

ijayhub commented 5 months ago

can I work on this if it valid