0
4
JRJose Romero
nextstaticgetStaticPropsβ’β’β’
Next TypeScript recipesTo fetch this data on pre-render, Next.js
allows you to export an async function called getStaticProps
from the same file. This function gets called at build time and lets you pass fetched data to the page's props on pre-render.
Library: next
Shortcut: next.static.props.create
export async function getStaticProps() {
return {
}
}