Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 604 Bytes

link-multiple-children.md

File metadata and controls

36 lines (27 loc) · 604 Bytes

Multiple children were passed to

Why This Error Occurred

In your application code multiple children were passed to next/link but only one child is supported:

For example:

import Link from 'next/link'

export default function Home() {
  return (
    <Link href="/about">
      <a>To About</a>
      <a>Second To About</a>
    </Link>
  )
}

Possible Ways to Fix It

Make sure only one child is used when using <Link>:

import Link from 'next/link'

export default function Home() {
  return (
    <Link href="/about">
      <a>To About</a>
    </Link>
  )
}