Next.js Discord

Discord Forum

does revalidatePath() apply to layout?

Answered
Birman posted this in #help-forum
Open in Discord
BirmanOP
using App Router, Server Components

so I have a homepage /dashboard and /dashboard/[...etc] are some other subpages

if I do revalidatePath("/dashboard") would that trigger a serverside update for every page inside of /dashboard including the layouts? I only want to revalidate /dashboard/page.tsx

if this isn't the pattern, is there a way to recursively do this? (just curious)
Answered by Birman
View full answer

4 Replies

BirmanOP
Answer
BirmanOP
nevermind I found it
Spectacled bear
Yes, you have to pass it as a paramter.
You can mark it answered.