Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 521 Bytes

app-dir-href-interpolation.md

File metadata and controls

30 lines (21 loc) · 521 Bytes

href interpolation is not supported in the /app directory

Why This Error Occurred

You have tried to use href interpolation with next/link in the /app directory. This is not supported.

Possible Ways to Fix It

Before

<Link
  href={{
    pathname: '/route/[slug]',
    query: { slug: '1' },
  }}
>
  link
</Link>

After

<Link href="/route/1">link</Link>

Useful Links

next/link documentation