Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 542 Bytes

link-no-children.md

File metadata and controls

35 lines (26 loc) · 542 Bytes

No children were passed to

Why This Error Occurred

In your application code next/link was used without passing a child:

For example:

import Link from 'next/link'

export default function Home() {
  return (
    <Link href="/about"></Link>
    // or
    <Link href='/about' />
  )
}

Possible Ways to Fix It

Make sure 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>
  )
}