File size: 467 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { Component } from 'react'
import Link from 'next/link'

let count = 0

export default class SelfReload extends Component {
  static getInitialProps({ res }) {
    if (res) return { count: 0 }
    count += 1

    return { count }
  }

  render() {
    return (
      <div id="self-reload-page">
        <Link href="/nav/self-reload" id="self-reload-link">
          Self Reload
        </Link>
        <p>COUNT: {this.props.count}</p>
      </div>
    )
  }
}