prisma / blogr-nextjs-prisma

111 stars 83 forks source link

Error: Invalid <Link> with <a> child , if next@13.4.19 version is updated and ran #29

Open avinashcodelabs opened 11 months ago

avinashcodelabs commented 11 months ago

If I update the next and react verison of the repo to their latest and run, will get following error,

Packages, I bump the verion:

"next": "13.4.19",
"react": "18.2.0",
"react-dom": "18.2.0",

Error: next-prisma-issue

jessycormier commented 7 months ago

This is because Next has updated how you need to use the Link component.

You no longer need to include the <a> inside so for example:

<Link href="/">
  <a className="bold" data-active={isActive("/")}>
    Feed
  </a>
</Link>

Can be written like the following:

<Link href="/" className="bold" data-active={isActive("/")}>
  Feed
</Link>