Next.js Discord

Discord Forum

how to re-validate path on dynamic route?

Unanswered
Common Moorhen posted this in #help-forum
Open in Discord
Common MoorhenOP
i have a route /app/projects/[id] with a layout that displays information about the project.
i want to revalidate the path layout when i update the project information.

how can i do it? i tried to move the update function to a server action and use revalidatePath('/app/projects/[id]', 'layout') but it doesn't work.

im using app router btw

0 Replies