rsnext/examples/data-fetch
Luis Alvarez D 333a9ea8ab
Documentation updates (#16503)
Fixes https://github.com/vercel/next.js/issues/16502

Check the issue for more details.
2020-08-24 02:23:12 +00:00
..
pages Documentation updates (#16503) 2020-08-24 02:23:12 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Documentation updates (#16503) 2020-08-24 02:23:12 +00:00
README.md Documentation updates (#16503) 2020-08-24 02:23:12 +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:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn 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

Deploy it to the cloud with Vercel (Documentation).