Skip to content

<Link> should admit *any* element underneath #920

@rauchg

Description

@rauchg

What it shouldn't do is create any element (for now we do, but we will show a warning)
The problem is that the current error message is misleading.

These should be possible:

<Link><img /></Link>
<Link><a /></Link>
<Link><a><img /></a></Link>

This should wrap with <a> for now and warn:

<Link>hi</Link>
<Link>{ ' woot' }</Link>

This should throw (dev-only, to ship less code)

<Link></Link>

https://github.com/zeit/next.js/blob/master/lib/link.js#L73

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions