title: Populate ListView from web service in React Native
body: <p>I have this piece of react-native code:</p>
  
  <pre><code>import React, { Component } from 'react';
  import {
    AppRegistry,
    StyleSheet,
    ToolbarAndroid,
    ListView,
    Text,
    View
  } from 'react-native';
  
  let styles = require('./styles/styles');
  
  class Sunshine extends Component {
  
    constructor(props) {
      super(props);
        this.state = {isLoading: true, jsonData: ''}
  
    }
    componentDidMount() {
      this.setState({jsonData: this.getMoviesFromApiAsync()})
    }
    render() {
      if(this.state.isLoading != true) {
        return (
          &lt;View style={styles.container}&gt;
          &lt;ToolbarAndroid
          style={styles.baseToolbar}
          logo={require('./ic_launcher.png')}
          title="Sunshine"
          titleTextColor="red"/&gt;
          &lt;View style={styles.viewcontainer}&gt;
          &lt;Text&gt;{this.state.jsonData.city.id}&lt;/Text&gt;
          &lt;ListView
            dataSource={this.state.jsonData.list}
            renderRow={(rowData) =&gt; &lt;Text&gt;{rowData.dt}&lt;/Text&gt;}
          /&gt;
          &lt;/View&gt;
          &lt;/View&gt;
        );
      } else {
        return (
          &lt;View style={styles.container}&gt;
          &lt;ToolbarAndroid
          style={styles.baseToolbar}
          logo={require('./ic_launcher.png')}
          title="Sunshine"
          titleTextColor="red"/&gt;
          &lt;View style={styles.singleviewcontainer}&gt;
          &lt;Text&gt;Loading...&lt;/Text&gt;
          &lt;/View&gt;
          &lt;/View&gt;
        );
      }
  
    }
  
    getMoviesFromApiAsync() {
        return fetch('http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&amp;mode=json&amp;units=metric&amp;cnt=14&amp;APPID=18dcba27e5bca83fe4ec6b8fbeed7827')
          .then((response) =&gt; response.json())
          .then((responseJson) =&gt; {
            this.setState({isLoading: false, jsonData: responseJson});
            console.log(responseJson);
            return responseJson;
          })
          .catch((error) =&gt; {
            console.error(error);
          });
      }
  
  }
  
  AppRegistry.registerComponent('Sunshine', () =&gt; Sunshine);
  </code></pre>
  
  <p>What I think it should happen is that when an answer arrives from the server, the list is populated with it's result. But that's not what's going on. Intsead i get this error:</p>
  
  <pre><code>undefined is not an object (evaluating 'allRowIDs.length')
  </code></pre>
  
  <p>So what exactly am i doing wrong here?</p>