title: Unable to use page data in nextjs
body: <p>i am new in nextjs,created &quot;Blog.js&quot; page (inside &quot;page&quot; folder) for fetch data via api,Whenever i open page in browser then data is displaying but whenever i call that page in index.js then displaying following error</p>
  <pre><code>&quot;TypeError: Cannot read property 'map' of undefined&quot;
  </code></pre>
  <p>Here is my code in &quot;Data.js&quot; (inside page folder)</p>
  <pre><code>import react from &quot;react&quot;;
  
  function Data(props)
  {
      console.warn(&quot;data&quot;,props);
      return &lt;div className=&quot;abc&quot;&gt;
      {
      props.data.map(data=&gt;(
              &lt;div&gt;
                  &lt;a&gt;{data.title}&lt;/a&gt;
                  {props.title}
              &lt;/div&gt;
          ))
   } 
  
  &lt;/div&gt;
  }
  Data.getInitialProps=async function()
  {
      const res= await fetch('https://jsonplaceholder.typicode.com/users')
      const data =await res.json();
      return {
          data
      }
  }
  export default Data
  </code></pre>
  <p>And after import, i am using following code for use &quot;Data&quot;,Where i am wrong ?</p>
  <pre><code>&lt;Data /&gt;
  </code></pre>