nextjs 14 app , how can i revalidate layout.tsx file
Unanswered
Asari posted this in #help-forum
AsariOP
in layout.tsx file
in NavBar component i get data with nextjs ServerActions,
i want to revalidate NavBar component with on-demand revalidation not like
also only the navbar component should revalidate. not the all pages like "revalidatePath(/,"layout")"
return (
<div >
<NavBar/>
{children}
<Footer/>
</div>
);in NavBar component i get data with nextjs ServerActions,
i want to revalidate NavBar component with on-demand revalidation not like
export const revalidate = 3600 // invalidate every houralso only the navbar component should revalidate. not the all pages like "revalidatePath(/,"layout")"