2017-01-12 04:14:49 +00:00
|
|
|
import Link from 'next/link'
|
|
|
|
import { Component } from 'react'
|
|
|
|
|
|
|
|
let counter = 0
|
|
|
|
|
2017-01-20 19:33:46 +00:00
|
|
|
const linkStyle = {
|
|
|
|
marginRight: 10
|
|
|
|
}
|
|
|
|
|
2017-01-12 04:14:49 +00:00
|
|
|
export default class extends Component {
|
|
|
|
|
|
|
|
increase () {
|
|
|
|
counter++
|
|
|
|
this.forceUpdate()
|
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<div className='nav-home'>
|
2017-01-20 19:33:46 +00:00
|
|
|
<Link href='/nav/about'><a id='about-link' style={linkStyle}>About</a></Link>
|
|
|
|
<Link href='/empty-get-initial-props'><a id='empty-props' style={linkStyle}>Empty Props</a></Link>
|
2017-02-15 18:27:41 +00:00
|
|
|
<Link href='/nav/self-reload'><a id='self-reload-link'>Self Reload</a></Link>
|
2017-01-12 04:14:49 +00:00
|
|
|
<p>This is the home.</p>
|
|
|
|
<div id='counter'>
|
|
|
|
Counter: {counter}
|
|
|
|
</div>
|
|
|
|
<button id='increase' onClick={() => this.increase()}>Increase</button>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|