Skip to content

[Suggestion]: Add isPending example to useActionState docsΒ #6987

@JakeSaterlay

Description

@JakeSaterlay

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions