rsnext/errors/empty-object-getInitialProps.md
Naggar 71c2354ecd fix broken link in error page (#10159)
This commit updates the link for Automatic Static Optimization page in the Documentation
2020-01-19 16:02:44 +01:00

13 lines
732 B
Markdown

# Empty Object Returned From `getInitialProps`
#### Why This Error Occurred
In one of your page components you added a `getInitialProps` that returned an empty object. This de-optimizes automatic static optimization. If you **meant** to do this and understand the **consequences** you can ignore this message as it is only shown in development.
#### Possible Ways to Fix It
Look for any page's using `getInitialProps` that return an empty object `{}`. You might also need to update higher order components (HOCs) to only add `getInitialProps` if they are present on the passed component.
### Useful Links
- [Automatic Static Optimization Documentation](https://nextjs.org/docs/advanced-features/automatic-static-optimization)