title: Fetch url to React component
body: <p>I got stuck with React fundamentals :/
  There is code that generates table with json data inside:</p>
  
  <pre><code>import React from 'react'    
  import { DataTable } from 'react-data-components';
  
  function buildTable(data) {
      const tableColumns = [
          { title: 'Author', prop: 'author' },
          { title: 'Country', prop: 'country' },
          { title: 'Title', prop: 'title' },
       ];
  
      return (
          &lt;DataTable
              className="container"
              keys="id"
              columns={tableColumns}
              initialData={data}
              initialPageLength={5}
           /&gt;
      );
  }
  
  
  let url = 'https://api.myjson.com/bins/1sbz3lp';
  
  fetch(url)
      .then(res =&gt; res.json())
      .then((rows) =&gt; {
          ReactDOM.render(buildTable(rows), document.getElementById('root'));
      });
  </code></pre>
  
  <p>It gets the job done in <code>index.js</code> but is it possible to render table inside React component? </p>
  
  <pre><code>const Home = () =&gt; (
       //renders buildTable(rows)
  )
  
  export default Home
  </code></pre>
  
  <p>Many thanks for all possible help, looking forward. </p>