Next.js Discord

Discord Forum

export const revalidate - from a util?

Unanswered
Catla posted this in #help-forum
Open in Discord
CatlaOP
How does this example work: https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#example

I thought the revalidate export could only appear in a Page, Layout or Route Segment?

7 Replies

Aleutian Tern
CatlaOP
classic vercel / now.sh
@Catla classic vercel / now.sh
Western yellowjacket
no, revalidatePath works well in app routing...
CatlaOP
I thought you couldn't use that outside of Route Segments and server actions?
i'll give it a try
@Western yellowjacket no, revalidatePath works well in app routing...
Giant panda
Please pay attention to what OP has been discussing. It's not about the revalidatePath function, it's about the revalidate route segment config option, which is something entirely different.