Skip to content

[BUG] onSuccess in useAction not triggered after revalidateTag/revalidatePathΒ #376

@piotrkulpinski

Description

@piotrkulpinski

Are you using the latest version of this library?

  • I verified that the issue exists in the latest next-safe-action release

Is there an existing issue for this?

  • I have searched the existing issues and found nothing that matches

Describe the bug

When you're using revalidateTag/revalidatePath in the action, the onSuccess callback is not triggered in the useAction (or useHookFormAction) hook.

Funny enough, the onSettled is triggered correctly.

Reproduction steps

.

Expected behavior

The onSuccess callback to be triggered when revalidateTag/revalidatePath is used in action

Link to a minimal reproduction of the issue

.

Operating System

macOs

Library version

8.0.5

Next.js version

15.3

Node.js version

21.7.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions