From f221c4ccc2574621f10d9f920a7457665b532735 Mon Sep 17 00:00:00 2001
From: Jared Rothenberg <58494405+jaredar1232@users.noreply.github.com>
Date: Wed, 2 Oct 2024 16:48:29 +0900
Subject: [PATCH] Update from-gatsby.md
The original instructions when converting from gatsby to next had users wrap the inner HTML inside the "Link" in an "a" tag, this is incorrect as of version 13+ and throws an error. I just refactored my project as per the instructions and am now going through to revert it. Tweaked wording and example for the correct and up dated process.
---
docs/migrating/from-gatsby.md | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/docs/migrating/from-gatsby.md b/docs/migrating/from-gatsby.md
index f24ec319..92d7f4dc 100644
--- a/docs/migrating/from-gatsby.md
+++ b/docs/migrating/from-gatsby.md
@@ -81,14 +81,12 @@ import Link from 'next/link'
export default function Home() {
return (
-
- blog
-
+ blog
)
}
```
-Update any import statements, switch `to` to `href`, and add an `` tag as a child of the element.
+Update any import statements, switch `to` to `href`. For versions prior to Next.js version 13, add an `` tag as a child of the Link element.
## Data Fetching
@@ -322,4 +320,4 @@ export default function SEO({ description, title }) {
## Learn more
-Take a look at [this pull request](https://github.com/leerob/gatsby-to-nextjs/pull/1) for more details on how an app can be migrated from Gatsby to Next.js. If you have questions or if this guide didn't work for you, feel free to reach out to our community on [GitHub Discussions](https://github.com/vercel/next.js/discussions).
\ No newline at end of file
+Take a look at [this pull request](https://github.com/leerob/gatsby-to-nextjs/pull/1) for more details on how an app can be migrated from Gatsby to Next.js. If you have questions or if this guide didn't work for you, feel free to reach out to our community on [GitHub Discussions](https://github.com/vercel/next.js/discussions).