Refresh from Server

A refresh the page on demand from server.

Importing Library

import { revalidatePath } from "next/cache";

Code Example

revalidatePath("/")
revalidatePath("/", "layout");
revalidatePath("/", "page");

References