Thanh hiếu nguyễn
Thanh hiếu nguyễn

Reputation: 33

Use both revalidatePath and Return Value in Server Action?

Can someone help me Description: I use useFormState with server action, but when i use both revalidatePath and return value, the revalidatePath work but doesn't return any value state for useFormState, when i remove revalidatePath, the returned value is received as normal, but i want to use both, any one can solve this?

I tried to remove one of two and it works perfect but not work using both, i want to use both of them enter image description here

Upvotes: 2

Views: 549

Answers (1)

Shikyo
Shikyo

Reputation: 1685

Having a loading template inside the root of the /app directory was causing the issue for me. Removing the loading templates resolved the issue.

Upvotes: 2

Related Questions