Functions
revalidatePath
Invalidates data associated with a path from Server Functions or Route Handlers. Dynamic patterns require type; handler invalidation is applied on subsequent visit. Source: https://nextjs.org/docs/app/api-reference/functions/revalidatePath
Formal Syntax & Structure
nextjs syntaxnextjs
revalidatePath(path: string, type?: "page" | "layout"): voidWorking Example
Example Snippetnextjs
import { revalidatePath } from "next/cache";// after authorized commitrevalidatePath("/catalog");