Next.js Discord

Discord Forum

revalidatePath

Answered
Kombai posted this in #help-forum
Open in Discord
KombaiOP
I have users list page and details page, when i delete the user from details the user is still listed in the listing page, im using revalidatePath in server action. Can anybody help me with this?
Answered by Arinji
if you want to revalidate all the pages with userID.. add the second param of "page" to it
View full answer

8 Replies

it wont work
you need to give it an absolute path
not [userID] it shld be the userid itself
if you want to revalidate all the pages with userID.. add the second param of "page" to it
Answer
Nile Crocodile
you don't need "(authenticated)". Just "/users/[userid]"
because "(authenticated)" is not a route itself, just a way in Nextjs to group similar routes together
oh yea that as well, missed that xD
@Arinji if you want to revalidate all the pages with userID.. add the second param of "page" to it
KombaiOP
Thank you it worked after putting the second argument