Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
7eed8380
Commit
7eed8380
authored
Jul 22, 2019
by
Joe Haddad
Committed by
Luis Fernando Alvarez D
Jul 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment out GIP in Custom <App> (#8055)
parent
5a54e871
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
README.md
packages/next/README.md
+14
-9
No files found.
packages/next/README.md
View file @
7eed8380
...
@@ -1421,15 +1421,20 @@ import React from 'react'
...
@@ -1421,15 +1421,20 @@ import React from 'react'
import App, { Container } from 'next/app'
import App, { Container } from 'next/app'
class MyApp extends App {
class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
// Only uncomment this method if you have blocking data requirements for
let pageProps = {}
// every single page in your application. This disables the ability to
// perform automatic static optimization, causing every page in your app to
if (Component.getInitialProps) {
// be server-side rendered.
pageProps = await Component.getInitialProps(ctx)
//
}
// static async getInitialProps({ Component, ctx }) {
// let pageProps = {}
return { pageProps }
//
}
// if (Component.getInitialProps) {
// pageProps = await Component.getInitialProps(ctx)
// }
//
// return { pageProps }
// }
render() {
render() {
const { Component, pageProps } = this.props
const { Component, pageProps } = this.props
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment