Skip to content

Latest commit

 

History

History

data-fetch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Data fetch example

Next.js was conceived to make it easy to create universal apps. That's why fetching data on the server and the client when necessary is so easy with Next.js.

By using getStaticProps Next.js will fetch data at build time from a page, and pre-render the page to static assets.

Deploy your own

Deploy the example using Vercel or preview live with StackBlitz

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example data-fetch data-fetch-app
yarn create next-app --example data-fetch data-fetch-app
pnpm create next-app --example data-fetch data-fetch-app

Deploy it to the cloud with Vercel (Documentation).