rsnext/examples/data-fetch
2022-05-27 21:21:40 +00:00
..
pages chore(example): update preact links in examples (#34233) 2022-02-11 18:44:09 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Remove licence from all example/package.json that has them (#28007) 2021-08-14 10:48:39 -05:00
README.md Update pnpm create next-app for latest pnpm 6 and 7 (#37254) 2022-05-27 21:21:40 +00:00

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
# or
yarn create next-app --example data-fetch data-fetch-app
# or
pnpm create next-app --example data-fetch data-fetch-app

Deploy it to the cloud with Vercel (Documentation).