Comment out GIP in Custom <App> (#8055)

This commit is contained in:
Joe Haddad 2019-07-22 10:54:26 -04:00 committed by Luis Fernando Alvarez D
parent 5a54e8715a
commit 7eed8380f1

View file

@ -1421,15 +1421,20 @@ import React from 'react'
import App, { Container } from 'next/app'
class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
let pageProps = {}
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx)
}
return { 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.
//
// static async getInitialProps({ Component, ctx }) {
// let pageProps = {}
//
// if (Component.getInitialProps) {
// pageProps = await Component.getInitialProps(ctx)
// }
//
// return { pageProps }
// }
render() {
const { Component, pageProps } = this.props