Skip to content

Commit

Permalink
Merge branch 'canary' into react-experimental-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
devknoll committed Apr 1, 2021
2 parents dd14a1e + 4de984c commit 6031f59
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/api-reference/next/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.push('/post/abc')}>Click me</span>
return <button onClick={() => router.push('/post/abc')}>Click me</button>
}
```

Expand Down Expand Up @@ -137,7 +137,7 @@ export default function ReadMore({ post }) {
const router = useRouter()

return (
<span
<button
onClick={() => {
router.push({
pathname: '/post/[pid]',
Expand All @@ -146,7 +146,7 @@ export default function ReadMore({ post }) {
}}
>
Click here to read more
</span>
</button>
)
}
```
Expand All @@ -171,7 +171,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.replace('/home')}>Click me</span>
return <button onClick={() => router.replace('/home')}>Click me</button>
}
```

Expand Down Expand Up @@ -282,7 +282,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.back()}>Click here to go back</span>
return <button onClick={() => router.back()}>Click here to go back</button>
}
```

Expand All @@ -298,7 +298,7 @@ import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()

return <span onClick={() => router.reload()}>Click here to reload</span>
return <button onClick={() => router.reload()}>Click here to reload</button>
}
```

Expand Down

0 comments on commit 6031f59

Please sign in to comment.