File size: 638 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import App from 'next/app'
function MyApp({ Component, pageProps, extraProp }) {
return <Component {...pageProps} extraProp={extraProp} />
}
// Only uncomment this method if you have blocking data requirements for
// every single page in your application. This disables the ability to
// perform automatic static optimization, causing every page in your app to
// be server-side rendered.
MyApp.getInitialProps = async (appContext) => {
// calls page's `getInitialProps` and fills `appProps.pageProps`
const appProps = await App.getInitialProps(appContext)
return { ...appProps, extraProp: 'Hi There' }
}
export default MyApp
|