getInitialProps in next.js is normally used to fetching data for the component. It can be called on both server and client side. I wrote a demo and below is what i found:
- A page request to the server will only trigger getInitialProps get called on the server and NOT on client side.
- Client side page navigation to other pages wrapped by <Link> will trigger getInitialProps only on client side and NOT on server side.