Closed JakeSaterlay closed 1 month ago
A section to describe the isPending value you can extract from useActionState
isPending
useActionState
https://react.dev/reference/react/useActionState
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
const [state, action, isPending] = useActionState(myAction, null);
Opened https://github.com/reactjs/react.dev/pull/6989 to work on this
Summary
A section to describe the
isPending
value you can extract fromuseActionState
Page
https://react.dev/reference/react/useActionState
Details
You can do
const [state, action, isPending] = useActionState(myAction, null);
to extract the pending state fromuseActionState
however I can't see an example of this anywhere in the documentation, adding this as an example would be quite useful