2023-07-05 15:11:16 +02:00
---
title: 'Multiple children were passed to `<Link>`'
---
2021-05-31 21:41:57 +02:00
2023-07-05 15:11:16 +02:00
## Why This Error Occurred
2021-05-31 21:41:57 +02:00
In your application code multiple children were passed to `next/link` but only one child is supported:
For example:
2023-07-05 15:11:16 +02:00
```js filename="example.js"
2021-05-31 21:41:57 +02:00
import Link from 'next/link'
export default function Home() {
return (
<Link href="/about">
<a>To About</a>
<a>Second To About</a>
</Link>
)
}
```
2023-07-05 15:11:16 +02:00
## Possible Ways to Fix It
2021-05-31 21:41:57 +02:00
Make sure only one child is used when using `<Link>`:
2023-07-05 15:11:16 +02:00
```js filename="example.js"
2021-05-31 21:41:57 +02:00
import Link from 'next/link'
export default function Home() {
return (
<Link href="/about">
<a>To About</a>
</Link>
)
}
```
2023-07-05 15:11:16 +02:00
> **Good to know:**
>
> - As on Next.js 13.0, `<Link>` no longer requires a child `<a>` tag. A [codemod](/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components) is provided to automatically update your codebase.