Next.js Discord

Discord Forum

revalidatePath() error?

Unanswered
Dimax posted this in #help-forum
Open in Discord
I have a modal component which submits data to a supabase table and I want to refresh the /clients page so the date is rendered after the new client is added. I've tried using revlidatePath and Tag but they seem to be giving me errors like this one.

2 Replies

I am pretty sure you can only call revalidatePath inside a server action or route handlers 🤔
you can see the examples here: https://nextjs.org/docs/app/api-reference/functions/revalidatePath
ughgh i see