Files
JJ KasperandGitHub 5a8398e34d Remove unstable_ prefix from unstable_blocking (#18276)
This removes the `unstable_` prefix to prepare for stabilizing the feature
2020-10-27 04:01:37 +00:00

22 lines
392 B
JavaScript

import { useRouter } from 'next/router'
export async function getStaticProps() {
return {
props: { time: new Date() },
}
}
export async function getStaticPaths() {
return { paths: [], fallback: 'blocking' }
}
const Page = ({ time }) => {
const { isFallback } = useRouter()
if (isFallback) return null
return <p>hello blocking {time.toString()}</p>
}
export default Page