title: problem in get fetch data in react-native
body: <p>I am a react-native beginner. I get following data from the server:</p>
  
  <p><code>[{"id":"1","tmb":"23\/5\/96","name":"ehsan","family":"kharaman"}]</code></p>
  
  <p>My goal is to display this data in the render method.</p>
  
  <p>My code is:</p>
  
  <pre><code>import React, {Component} from 'react';
  import {View, Text} from 'react-native';
  
  class App extends Component {
    state = {
      data: '',
    };
    componentDidMount = () =&gt; {
      fetch('http://192.168.1.34/karbar/select.php', {
        method: 'GET',
      })
        .then(response =&gt; response.json())
        .then(responseJson =&gt; {
          console.log(responseJson);
          this.setState({
            data: responseJson,
          });
        })
        .catch(error =&gt; {
          console.error(error);
        });
    };
    render() {
      return (
        &lt;View&gt;
          &lt;Text&gt;{this.state.data.name}&lt;/Text&gt;
        &lt;/View&gt;
      );
    }
  }
  export default App;
  </code></pre>