Skip to content

Commit

Permalink
Docs: Update preview-mode.md
Browse files Browse the repository at this point in the history
Add note to 'Clear preview mode cookies' that explains the need to pass `prefetch={false}` to `Link` component to prevent clearing cookies accidentally.
(Docs: potential preview-mode error on production build vercel#34129)
  • Loading branch information
mattyocode committed Feb 9, 2022
1 parent 2e0598d commit 5562249
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/advanced-features/preview-mode.md
Expand Up @@ -186,6 +186,8 @@ export default function handler(req, res) {
}
```

> **Note:** If calling this route using `Link` component, you must pass in `prefetch={false}` to prevent calling `clearPreviewData` during prefetch.
### Specify the preview mode duration

`setPreviewData` takes an optional second parameter which should be an options object. It accepts the following keys:
Expand Down

0 comments on commit 5562249

Please sign in to comment.