47ff1eb95a
* Ability to Disable SSG Fallback * Throw error when value is missing * Fix existing tests * Adjust error message * Do not render fallback at build time for `fallback: false` page * Fix existing fallback behavior * fix build * fix version * fix some tests * Fix last test * Add docs for get static paths * Add explicit mode tests * test for fallback error message
20 lines
448 B
JavaScript
20 lines
448 B
JavaScript
import React from 'react'
|
|
|
|
// eslint-disable-next-line camelcase
|
|
export async function unstable_getStaticPaths() {
|
|
return { paths: [{ foo: 'bad', baz: 'herro' }], fallback: true }
|
|
}
|
|
|
|
// eslint-disable-next-line camelcase
|
|
export async function unstable_getStaticProps({ params }) {
|
|
return {
|
|
props: {
|
|
post: params.post,
|
|
time: (await import('perf_hooks')).performance.now(),
|
|
},
|
|
}
|
|
}
|
|
|
|
export default () => {
|
|
return <div />
|
|
}
|