Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

can you call api in next.js getserverside props

// pages/home
import { getData } from './api/user'

//...

export async function getServerSideProps(context) {
    const jsonData = await getData()
    //...
}
 
PREVIOUS NEXT
Tagged: #call #api #getserverside #props
ADD COMMENT
Topic
Name
3+2 =