Get Server Side Props Context Requirement
Unanswered
Asian paper wasp posted this in #help-forum
Asian paper waspOP
Does the
context param have to be in the getServerSideProps function?export async function getServerSideProps(context: any) {
// awesome code here
}1 Reply
@Asian paper wasp Does the `context` param have to be in the `getServerSideProps` function?
ts
export async function getServerSideProps(context: any) {
// awesome code here
}
no.
it's the same as
export async function getServerSideProps() is okit's the same as
function test() {
return 0;
}
// this is still allowed by JS
test(123, "hello world");