title: Display Fetched Data from API in react native table component
body: <p>As I am new to react native I don't know how to do this.want to show fetched data from API in react native table like if there is 10 user then it should display 10 users data in table format.</p>
  
  <pre><code>export default class LeaveApprove extends Component {
    constructor(props) {
      super(props);
      this.state = {
       data:[]
        tableHead: ['S.No', 'NAme', 'Title'],
        tableData: [
          ['1', 'RAm', 'Manager',],
          ['2', 'Rahul', 'Admin',],
          ['3', 'Rohit', 'Accounts'],
    ],
  
  
      }
    }
     componentDidMount(){
          const url = "https://jsonplaceholder.typicode.com/users";
          fetch(url,{
            method:'GET'
          })
          .then(response =&gt;response.json())
          .then(data =&gt;{
          this.setState({data:data})
          })
        }
  
    render() {
      const state = this.state;
      return (
        &lt;Container&gt;
     &lt;ScrollView horizontal={true} vertical={true}&gt;
  
                &lt;Table borderStyle={{borderWidth: 2, borderColor: '#c8e1ff'}} style={{height:'100%'}}&gt;
            &lt;Row data={state.tableHead} style={styles.head} textStyle={styles.text} widthArr={[46,50,65,65,40,80,150]}/&gt;
            &lt;Rows data={state.tableData} style={styles.row}  textStyle={styles.text} widthArr={[46,50,65,65,40,80,150]} /&gt;
          &lt;/Table&gt;
  
            &lt;/ScrollView&gt;
  
  
      &lt;/Container&gt;
  
      )
    }
  }
  </code></pre>