mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
`pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github.com/vercel/next.js/issues/15647
12 lines
182 B
JavaScript
12 lines
182 B
JavaScript
export default function Gssp() {
|
|
return <p id="gssp">getServerSideProps</p>
|
|
}
|
|
|
|
export const getServerSideProps = () => {
|
|
return {
|
|
props: {
|
|
hello: 'world',
|
|
},
|
|
}
|
|
}
|