Skip to content

Why no React.useTransition() in useServerAction()? #451

@andreas-gobell-mw

Description

@andreas-gobell-mw

While checking the useServerAction() source I saw that it does not use React.useTransition() to wrap the action execution in a startTransition.

In contrast next-safe-action's useAction implementation does so.

Is oRPC's implementation to omit startTransition a deliberate choice and if yes, what is the reasoning behind it?


BTW I saw that next-safe-action also provides additional hooks like useOptimisticAction and useStateAction(). Maybe these are also interesting to provide for oRPC to be attractive to next-safe-action users?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions