title: React Cannot read property of undefined - Array.map (<anonymous>)
body: <p>I am fetching data from api and importing the data in the WeatherData.js and passing it as a prop to SmallWeatherCard.js because I want to pass it to another component too later on.</p>
  <p>when I do console.log(data) in SmallWeatherCard.js I can see the whole data in the console but when trying to map it I get an error &quot;Cannot read property of undefined&quot;</p>
  <p>What am I doing wrong here?</p>
  <p>all the code here: <a href="https://codesandbox.io/s/competent-ramanujan-yn3iq?file=/src/components/SmallWeatherCard.js" rel="nofollow noreferrer">Codesanbox</a></p>
  <pre><code>import React from &quot;react&quot;;
  
  export const SmallWeatherCard = ({ data }) =&gt; {
  
    return (
      &lt;div&gt;
        {data.properties.timeseries.map((i, index) =&gt; (
          &lt;div&gt;
            &lt;ul key={index}&gt;
              &lt;li&gt; {i.data.next_6_hours.summary.symbol_code}
               &lt;/li&gt;
              &lt;li&gt;
                {Math.round(i.data.next_6_hours.details.air_temperature_min)}°
              &lt;/li&gt;
              &lt;li&gt;|&lt;/li&gt;
              &lt;li&gt;
                {Math.round(i.data.next_6_hours.details.air_temperature_max)}°
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
        ))}
      &lt;/div&gt;
    );
  };
  
  </code></pre>