Skip to content

Is this demo in the React doc an incorrect usage of startTransition? #8158

Description

@ZJRui
Image https://react.dev/reference/rsc/server-functions#server-functions-with-actions
  1. Shouldn't setError and setName need to be wrapped with a new startTransition?
  2. It seems meaningless to apply startTransition to await updateName in the document, doesn't it?

https://react.dev/reference/react/useTransition#react-doesnt-treat-my-state-update-after-await-as-a-transition

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions