rsnext/errors/cant-override-next-props.md
JJ Kasper 912e45b506 Show error when router or Component are returned in _app.js (#6487)
* Show error when `router` or `Component` are returned in _app.js
getInitialProps

* Update to only show error in dev mode

* Update packages/next-server/server/render.tsx

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
2019-03-01 18:08:27 +01:00

13 lines
526 B
Markdown

# Can't Override Next Props
#### Why This Error Occurred
In your `pages/_app.js` you returned an object from `getInitialProps` that contained a `router` or `Component` value. These property names are used by Next.js and can not be overwritten.
#### Possible Ways to Fix It
Look in your _app.js component's `getInitialProps` function and make sure neither of these property names are present in the object returned.
### Useful Links
- [The issue this was reported in: #6480](https://github.com/zeit/next.js/issues/6480)