Commit graph

5 commits

Author SHA1 Message Date
Samuel
739e6f0760
Docs: Add useful link to invalid-getstaticprops-value error message (#35915)
## 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.
2022-04-05 18:59:58 +00:00
tarunama
7fd5a24d94
feat: add type to previewData (#21574)
`previewData` was already [typed declare variable](https://github.com/vercel/next.js/compare/canary...tarunama:feature/remove-any1?expand=1#diff-bd7baf53ff559d84461af8b2fd62cade7e2d8eb203f489e24a27c5b83a79a9d3L1380).
So I have defined `PreviewData` type, and adapt for avoiding error by type safe.
2021-04-20 18:13:48 +00:00
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
JJ Kasper
c9d9f1131c
Remove unstable_ prefix from new methods (#10723)
* Rename getServerProps to getServerSideProps

* Remove unstable_ prefix from new methods

* Add error when legacy methods are detected

* Add legacy methods for babel transform

* Add unstable_getServerSideProps also

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Update types import

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-27 11:57:39 -06:00
JJ Kasper
95071730b6
Add err.sh for getStaticProps error (#10619)
* Add err.sh for getStaticProps error

* Prettify error

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-21 00:45:50 -05:00