Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
e28f80cd
Commit
e28f80cd
authored
Jan 16, 2017
by
Dan Zajdband
Committed by
Tim Neutkens
Jan 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated <Link> in repo, always wrapping an anchor. (#798)
parent
a66ff658
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
16 deletions
+16
-16
README.md
README.md
+1
-1
index.js
examples/data-fetch/pages/index.js
+1
-1
preact.js
examples/data-fetch/pages/preact.js
+1
-1
index.js
examples/hello-world/pages/index.js
+1
-1
layout.js
examples/layout-component/components/layout.js
+3
-3
index.js
examples/using-inferno/pages/index.js
+1
-1
index.js
examples/using-preact/pages/index.js
+1
-1
Header.js
examples/using-router/components/Header.js
+3
-3
Page.js
examples/with-mobx/components/Page.js
+1
-1
Page.js
examples/with-redux/components/Page.js
+1
-1
link.js
test/integration/basic/pages/link.js
+1
-1
index.js
test/integration/basic/pages/nav/index.js
+1
-1
No files found.
README.md
View file @
e28f80cd
...
...
@@ -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
...
...
examples/data-fetch/pages/index.js
View file @
e28f80cd
...
...
@@ -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
>
)
}
...
...
examples/data-fetch/pages/preact.js
View file @
e28f80cd
...
...
@@ -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
>
)
}
...
...
examples/hello-world/pages/index.js
View file @
e28f80cd
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
>
)
examples/layout-component/components/layout.js
View file @
e28f80cd
...
...
@@ -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
>
...
...
examples/using-inferno/pages/index.js
View file @
e28f80cd
...
...
@@ -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
>
)
examples/using-preact/pages/index.js
View file @
e28f80cd
...
...
@@ -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
>
)
examples/using-router/components/Header.js
View file @
e28f80cd
...
...
@@ -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
>
)
...
...
examples/with-mobx/components/Page.js
View file @
e28f80cd
...
...
@@ -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
>
)
...
...
examples/with-redux/components/Page.js
View file @
e28f80cd
...
...
@@ -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
>
)
...
...
test/integration/basic/pages/link.js
View file @
e28f80cd
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
>
)
test/integration/basic/pages/nav/index.js
View file @
e28f80cd
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment