N
Nuxt7mo ago
rampup_

Fetch data during static generate

I wonder if there is an option to fetch 3rd party api data during static generate. All options I tried also fetched the data in the browser.
2 Replies
rampup_
rampup_OP7mo ago
Data Fetching: getStaticProps | Next.js
Fetch data and generate static pages with getStaticProps. Learn more about this API for data fetching in Next.js.
rampup_
rampup_OP7mo ago
useAsyncData seems to do the trick, while useFetch moves the data fetch task to the browser. Maybe that should be stated more explicitly in the docs
Want results from more Discord servers?
Add your server