From 99a6d2594f87c6a1b1a8845c06b345df0b105f8b Mon Sep 17 00:00:00 2001 From: "akfm.sato" <01047245@CF0286.local> Date: Fri, 1 Dec 2023 17:49:49 +0900 Subject: [PATCH] fix revalidatePath docs: if dynamic segment path, `type` must be `page`. --- docs/02-app/02-api-reference/04-functions/revalidatePath.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx b/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx index a8425901f17ad..cca08351119b7 100644 --- a/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx +++ b/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx @@ -17,7 +17,7 @@ revalidatePath(path: string, type?: 'page' | 'layout'): void; ``` - `path`: Either a string representing the filesystem path associated with the data you want to revalidate (for example, `/product/[slug]/page`), or the literal route segment (for example, `/product/123`). Must be less than 1024 characters. -- `type`: (optional) `'page'` or `'layout'` string to change the type of path to revalidate. +- `type`: (optional) `'page'` or `'layout'` string to change the type of path to revalidate. If `path` contains a dynamic segment (for example, `/product/[slug]/page`), it must be `page`. ## Returns