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