revalidatePath issue in [email protected] #65352
Unanswered
yusufs35
asked this question in
App Router
Replies: 2 comments
-
|
I encountered the same issue: by using revalidatePath in a server action (in an event handler), I lost all of my state variable values. That was very weird and I still don’t know why this happens. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Getting the same problem here, export const revalidate = 300; doesn't work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys. I have encountered an issue while form handling in server actions. I employ [email protected]
First I want to share my code to talk about the issue.
`
In the code above, revalidatePath method causes the sender form reload or reset. This is my opinion because I couldn't understand what the thing is going on. I get lost the form data, all the form inputs get blank and the state returned by the action and catched by the useFormState has the initial value rather than returned value. The response object I get in the form is:
{ ok: null, message: null }If I comment the line includes revalidatePath or downgrade the Next version to 14.1.4 everything is ok.
This is my form:
`
Beta Was this translation helpful? Give feedback.
All reactions