scaffolding-nextjs
Version:
Templates that aid in the development of NextJS applications.
30 lines (26 loc) • 776 B
JavaScript
/**
* @file /pages/_app.js
* @see https://nextjs.org/docs#custom-app
*/
import React from 'react'
import App from 'next/app'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return (
<Component {...pageProps} />
)
}
}
// 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 function (appContext) {
// // calls page's `getInitialProps` and fills `appProps.pageProps`
// const appProps = await MyApp.getInitialProps(appContext);
//
// return { ...appProps }
// }
export default MyApp