This feature allows you to re-render pages whose content changed on the “Admin Panel”.
This feature enables you to re-render pages whose content changed on the “Admin Panel”.
By default, pages are served as static versions.
We’ll modify our layout.tsx file.
import { Refresher } from 'cms-renderer/lib/refresher';
import { revalidatePath } from 'next/cache';
// Function to run on revalidation
async function revalidate() {
'use server';
revalidatePath('/', 'layout'
After changing your root layout, you can edit fields in your database and see updates reflected after refreshing the page.