title: React Native : render a fetched data structure
body: <p>I am new to Javascript (NodeJS &amp; JSON data structure) and React native, and I am trying to display some datas on the iOS screen test (react native). I did my best to understand but I am stuck.</p>
  
  <p>I made a GET route on my Express app at /places on localhost:3000 :</p>
  
  <pre><code>router.get('/places', (req, res) =&gt; {
      MongoClient.connect(url, function (err, db) {
          if (err) {
              console.log('Unable to connect to the mongoDB server. Error:', err);
          } else {
              console.log('Connection established to', url);
  
      var colPlaces = db.collection('places');
  
      colPlaces.find().toArray(function  (err,result) {
          if (err) {
              res.send('error!');
          } else if (result.length) {
              res.send(result);
          } else {
              res.send('No entries');
          } 
      })
  
      db.close();
  }});
  })
  </code></pre>
  
  <p>It displays a data structure on my browser (seems to be an Array of JSON objects ?)</p>
  
  <pre><code>[
  {"_id":"5894fdd694f5d015dc0962bc","name":"The good bar","city":"London"},
  {"_id":"5894fdd694f5d015dc0962bd","name":"Alpha bar","city":"Paris"}
  ]
  </code></pre>
  
  <p>I am then trying to render it on my native react project : </p>
  
  <pre><code>constructor(props) {
      super(props);
  
      var datas = async function getDatas() { 
          try { 
              let response = await fetch('http://localhost:3000/places'); 
              let responseJson = await response.json(); 
              return responseJson; 
          } catch(error) { 
              console.error(error); } 
      }
  
      const ds = new ListView.DataSource({rowHasChanged: (r1, r2) =&gt; r1 !== r2});
  
      this.state = {
        dataSource: ds.cloneWithRows(datas())
      };
  }
  
  render() {
      return (
         &lt;View style={{flex: 1, paddingTop: 22}}&gt;
          &lt;ListView
            dataSource={this.state.dataSource}
            renderRow={(rowData) =&gt; &lt;Text&gt;{rowData}&lt;/Text&gt;}
          /&gt;
        &lt;/View&gt;
      );
  }
  </code></pre>
  
  <p>But all I got is two "0" on my screen.
  Can someone help me to find out what is wrong ?
  What is/are,
  * "result" variable structure ? seems to be an array of JS objects.
  * "response" and "responseJSON" variables ?
  * "datas()" and dataSource type</p>
  
  <p>Should I parse something ? I am a bit confuse. Thank you.</p>