import { cache, use } from 'react' export default function Layout({ children }) { const getData = cache(() => fetch('https://next-data-api-endpoint.vercel.app/api/random?layout', { next: { revalidate: 10, tags: ['thankyounext'] }, }).then((res) => res.text()) ) const dataPromise = getData() const data = use(dataPromise) return ( <>

revalidate 10: {data}

{children} ) }