- Can I make a Next.js Progressive Web App?
- Yes! Here's an example.
+ Can I make a Next.js Progressive Web App (PWA)?
+ Yes! Check out our PWA Example to see how it works.
diff --git a/examples/data-fetch/README.md b/examples/data-fetch/README.md
index d7146d911d652..6dc5c58e7ed8c 100644
--- a/examples/data-fetch/README.md
+++ b/examples/data-fetch/README.md
@@ -1,9 +1,9 @@
# 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.
+on the server and the client when necessary is so easy with Next.js.
-Using `getStaticProps` fetches data at build time from a page, Next.js will pre-render this page at build time.
+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
@@ -13,8 +13,6 @@ Deploy the example using [Vercel](https://vercel.com):
## How to use
-### Using `create-next-app`
-
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
```bash
@@ -23,23 +21,4 @@ npx create-next-app --example data-fetch data-fetch-app
yarn create next-app --example data-fetch data-fetch-app
```
-### Download manually
-
-Download the example:
-
-```bash
-curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/data-fetch
-cd data-fetch
-```
-
-Install it and run:
-
-```bash
-npm install
-npm run dev
-# or
-yarn
-yarn dev
-```
-
Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
diff --git a/examples/data-fetch/package.json b/examples/data-fetch/package.json
index 55d94b79a3ea6..17aacdb9fe651 100644
--- a/examples/data-fetch/package.json
+++ b/examples/data-fetch/package.json
@@ -8,9 +8,8 @@
},
"dependencies": {
"next": "latest",
- "node-fetch": "^2.6.0",
- "react": "^16.8.4",
- "react-dom": "^16.8.4"
+ "react": "^16.13.1",
+ "react-dom": "^16.13.1"
},
- "license": "ISC"
+ "license": "MIT"
}
diff --git a/examples/data-fetch/pages/index.js b/examples/data-fetch/pages/index.js
index 90dc176afd3cd..d668c07e8fd6c 100644
--- a/examples/data-fetch/pages/index.js
+++ b/examples/data-fetch/pages/index.js
@@ -1,5 +1,4 @@
import Link from 'next/link'
-import fetch from 'node-fetch'
function Index({ stars }) {
return (
diff --git a/examples/data-fetch/pages/preact-stars.js b/examples/data-fetch/pages/preact-stars.js
index a8435ed70c3ff..0db33607dde37 100644
--- a/examples/data-fetch/pages/preact-stars.js
+++ b/examples/data-fetch/pages/preact-stars.js
@@ -1,5 +1,4 @@
import Link from 'next/link'
-import fetch from 'node-fetch'
function PreactStars({ stars }) {
return (