next-learn
next-learn copied to clipboard
Chapter 12 - deprecated revalidatePath
Chapter 12 uses the revalidatePath function which is marked as deprecated in:
_node_modules/.pnpm/[email protected][email protected][email protected]_f7vxvinj2tmc3s2kx24vpyvnma/node_modules/next/dist/server/web/spec-extension/revalidate.d.ts_
/**
* @deprecated this function has been deprecated in favor of expirePath()
* This function allows you to purge [cached data](https://nextjs.org/docs/app/building-your-application/caching) on-demand for a specific path.
*
* Read more: [Next.js Docs: `revalidatePath`](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)
*/
export declare function revalidatePath(originalPath: string, type?: 'layout' | 'page'): void;