Next.js Discord

Discord Forum

does revalidatePath() apply to layout?

Answered
Peterbald posted this in #help-forum
Open in Discord
PeterbaldOP
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 Peterbald
View full answer

4 Replies

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