Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rauchg opened this issue Jan 29, 2017 · 3 comments
Closed

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

rauchg opened this issue Jan 29, 2017 · 3 comments
Assignees

Comments

@rauchg
Copy link
Member

rauchg commented Jan 29, 2017

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

@timneutkens
Copy link
Member

Looking into this now 🙌

@timneutkens
Copy link
Member

#921

@rauchg
Copy link
Member Author

rauchg commented Jan 30, 2017

Thank you @timneutkens !

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants