Does the next.js have types for getServerSideProps context

Solution:
have had much more luck not declaring a type on the function itself, and instead just typing the context as GetServerSidePropsContext
Jump to solution
5 Replies
JEM
JEM16mo ago
Functions: getServerSideProps
API reference for getServerSideProps. Learn how to fetch data on each request with Next.js.
JEM
JEM16mo ago
Yup You can toggle the code example to typescript
cje
cje16mo ago
i hate the types in the Next.js docs
Solution
cje
cje16mo ago
have had much more luck not declaring a type on the function itself, and instead just typing the context as GetServerSidePropsContext
JEM
JEM16mo ago
Nice yeah I like that too
Want results from more Discord servers?
Add your server