Commit a691dd06 authored by Tim Neutkens's avatar Tim Neutkens

State is no longer used since #4156

parent 65a9a63a
...@@ -990,36 +990,6 @@ export default class MyApp extends App { ...@@ -990,36 +990,6 @@ export default class MyApp extends App {
} }
``` ```
When using state inside app the `hasError` property has to be defined:
```js
import App, {Container} from 'next/app'
import React from 'react'
export default class MyApp extends App {
static async getInitialProps ({ Component, router, ctx }) {
let pageProps = {}
if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx)
}
return {pageProps}
}
state = {
hasError: null
}
render () {
const {Component, pageProps} = this.props
return <Container>
<Component {...pageProps} />
</Container>
}
}
```
### Custom `<Document>` ### Custom `<Document>`
<p><details> <p><details>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment