Question: In Next.js, you can use in your React components a lifecycle method bound to the server side rendering on first load. 

I tried to use this function as presented in [the ZEIT tutorial](https://zeit.co/blog/next#data-fetching-is-up-to-the-developer) (alternatively [on their Github](https://github.com/zeit/next.js#component-lifecycle)), but this.props doesn't seem to get JSON returned by the function. 
When I click on the component, console print an empty object. 

```
import React from 'react'
import 'isomorphic-fetch'
export default class extends React.Component {
    static async getInitialProps () {
        const res = await fetch('https://en.wikipedia.org/w/api.php?action=query&titles=Main%20Page&prop=revisions&rvprop=content&format=json')
        const data = await res.json()
        return { data }
    }
    print() {
        console.log(this.props);
    }
    render() {
        return <div onClick={this.print.bind(this)}>print props</div>
    }
}

```

Answer: 
you can make your call in getInitialProps method like this with little modification in your code

```
import React from 'react'
import 'isomorphic-fetch'
export default class extends React.Component {
    static async getInitialProps () {
        const res = await fetch('https://en.wikipedia.org/w/api.php?action=query&titles=Main%20Page&prop=revisions&rvprop=content&format=json')
        const data = await res.json()
        return { jsonData: data }
    }
    print() {
        console.log(this.props.jsonData);
    }
    render() {
        return <div onClick={()=> this.print()}>print props</div>
    }
}

```
I tried your code and it seems to work fine, console shows `this.props`:

[![Result object](https://i.stack.imgur.com/ygMsJ.png)](https://i.stack.imgur.com/ygMsJ.png)