title: React native fetch and componentDidMount
body: <p>I'm trying to fetch some data and display on render method:</p>
  
  <pre><code>constructor(props) {
     super(props);
  
     this.state = {
       job: {}
     }
  }
  
  componentDidMount() {
     fetch(API_URL).then((res) =&gt; res.json()).then((res) =&gt; this.setState({ job: res.job }));
  }
  
  render() {
     return (&lt;Text&gt;{this.state.job.name}&lt;/Text&gt;)
  }
  </code></pre>
  
  <p>But when the screen is loaded and I try to access the job name occurs an exception:</p>
  
  <p>undefined is not an object</p>
  
  <p>How can I fetch data from an API and render properly ?
  Thanks.</p>