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

Updated <Link> in repo, always wrapping an anchor. #798

Merged
merged 1 commit into from
Jan 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export default () => (
When this higher-level `<Link>` component is first used, the `ServiceWorker` gets installed. To turn off prefetching on a per-`<Link>` basis, you can use the `prefetch` attribute:

```jsx
<Link href='/contact' prefetch={false}>Home</Link>
<Link href='/contact' prefetch={false}><a>Home</a></Link>
```

#### Imperatively
Expand Down
2 changes: 1 addition & 1 deletion examples/data-fetch/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class MyPage extends React.Component {
return (
<div>
<p>Next.js has {this.props.stars} ⭐️</p>
<Link href='/preact'>How about preact?</Link>
<Link href='/preact'><a>How about preact?</a></Link>
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/data-fetch/pages/preact.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class MyPage extends React.Component {
return (
<div>
<p>Preact has {this.props.stars} ⭐️</p>
<Link href='/'>I bet next has more stars (?)</Link>
<Link href='/'><a>I bet next has more stars (?)</a></Link>
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Link from 'next/link'
export default () => (
<div>Hello World. <Link href='/about'>About</Link></div>
<div>Hello World. <Link href='/about'><a>About</a></Link></div>
)
6 changes: 3 additions & 3 deletions examples/layout-component/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export default ({ children, title = 'This is the default title' }) => (
</Head>
<header>
<nav>
<Link href='/'>Home</Link> |
<Link href='/about'>About</Link> |
<Link href='/contact'>Contact</Link>
<Link href='/'><a>Home</a></Link> |
<Link href='/about'><a>About</a></Link> |
<Link href='/contact'><a>Contact</a></Link>
</nav>
</header>

Expand Down
2 changes: 1 addition & 1 deletion examples/using-inferno/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import React from 'react'
import Link from 'next/prefetch'

export default () => (
<div>Hello World. <Link href='/about'>About</Link></div>
<div>Hello World. <Link href='/about'><a>About</a></Link></div>
)
2 changes: 1 addition & 1 deletion examples/using-preact/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import React from 'react'
import Link from 'next/link'

export default () => (
<div>Hello World. <Link href='/about'>About</Link></div>
<div>Hello World. <Link href='/about'><a>About</a></Link></div>
)
6 changes: 3 additions & 3 deletions examples/using-router/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import Router from 'next/router'

export default () => (
<div>
<Link href='/'>Home</Link>
<Link href='/about'>About</Link>
<Link href='/error'>Error</Link>
<Link href='/'><a>Home</a></Link>
<Link href='/about'><a>About</a></Link>
<Link href='/error'><a>Error</a></Link>
</div>
)

Expand Down
2 changes: 1 addition & 1 deletion examples/with-mobx/components/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Page extends React.Component {
<h1>{this.props.title}</h1>
<Clock lastUpdate={this.props.store.lastUpdate} light={this.props.store.light} />
<nav>
<Link href={this.props.linkTo}>Navigate</Link>
<Link href={this.props.linkTo}><a>Navigate</a></Link>
</nav>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion examples/with-redux/components/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default connect(state => state)(({ title, linkTo, lastUpdate, light }) =>
<h1>{title}</h1>
<Clock lastUpdate={lastUpdate} light={light} />
<nav>
<Link href={linkTo}>Navigate</Link>
<Link href={linkTo}><a>Navigate</a></Link>
</nav>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/basic/pages/link.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import Link from 'next/link'
export default () => (
<div>Hello World. <Link href='/about'>About</Link></div>
<div>Hello World. <Link href='/about'><a>About</a></Link></div>
)
2 changes: 1 addition & 1 deletion test/integration/basic/pages/nav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class extends Component {
render () {
return (
<div className='nav-home'>
<Link href='/nav/about'>About</Link>
<Link href='/nav/about'><a>About</a></Link>
<p>This is the home.</p>
<div id='counter'>
Counter: {counter}
Expand Down