rsnext/errors/invalid-getstaticprops-value.md
Shu Uesugi c52c0389fd
Add params to getStaticProps on err.sh (#10751)
* Add params to getStaticProps

* Update errors/invalid-getstaticprops-value.md

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-01 15:20:28 +01:00

21 lines
420 B
Markdown

# Invalid getStaticProps Return Value
#### Why This Error Occurred
In one of the page's `getStaticProps` the return value had the incorrect shape.
#### Possible Ways to Fix It
Make sure to return the following shape from `getStaticProps`:
```js
export async function getStaticProps(ctx: {
params?: ParsedUrlQuery
preview?: boolean
previewData?: any
}) {
return {
props: { [key: string]: any }
}
}
```