Next.js Discord

Discord Forum

revalidatePath weird behavior

Unanswered
Ruddy Duck posted this in #help-forum
Open in Discord
Ruddy DuckOP
Hello, I'm using revalidatePath from my server actions and I found out int he documentation that:
Currently, revalidatePath invalidates all the routes in the client-side Router Cache when used in a server action. This behavior is temporary and will be updated in the future to apply only to the specific path.

This causes errors on my app because the pages try to re-render and to fetch data that might not exist anymore. I'd be curious to know why that is the case and when/if this is going to be solved. Is the recommendation to use revalidateTag instead? Thanks for the help!

0 Replies