739e6f0760
## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` I would like to add useful link to `getStaticProps` invalid return value error message as currently there is no useful link being provided. I believe that this might improve the developer experience.
569 B
569 B
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
:
export async function getStaticProps(ctx: {
params?: ParsedUrlQuery;
preview?: boolean;
previewData?: PreviewData;
}) {
return {
props: { [key: string]: any }
}
}