title: React: Uncaught TypeError: Cannot read properties of undefined (reading '0') error
body: <p>It is my first time js and react.js project. and I have a problem with printing out json array data.</p>
  <p>Here's my code</p>
  <pre><code>const [appData, setAppData] = useState({});
  const [appdevData, setAppdevData] = useState('');
  
  axios
   .all([
    .get(url1)
    .get(url2)
  ])
  
  .then(
    axios.spread((res1, res2) =&gt; {
      const data1 = res1.data;
      const data2 = res2.data;
  
      setAppData(data1);
      setAppdevData(data2().results[0].developer.name);
    })
  }, []);
  
  return (
    &lt;section className={styles.itemDisplaySection}&gt;
    &lt;div className={styles.itemDisplayFlex}&gt;
          &lt;table className={styles.itemDisplayTable}&gt;
            &lt;tr&gt;
              &lt;td&gt;APP ID&lt;/td&gt;
              &lt;td&gt;{appData.app_id}&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;APP Type&lt;/td&gt;
              &lt;td&gt;{appData.type}&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;Developer&lt;/td&gt;
              &lt;td&gt;{appdevData.results[0].developer.name}&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;Release Date&lt;/td&gt;
              &lt;td&gt;{appData.release_date}&lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
        &lt;/div&gt;
      &lt;/section&gt;
  );
  </code></pre>
  <p>and here is my appData.json, and appdevData.json data.</p>
  <pre><code>appdata.json
  {
      &quot;app_id&quot;: 1089090,
      &quot;name&quot;: &quot;testdata&quot;,
      &quot;header_url&quot;: &quot;https://cdn.akamai.steamstatic.com/steam/apps/1089090/header_koreana.jpg?t=1658473684&quot;,
      &quot;release_date&quot;: &quot;2020-03-26&quot;,
      &quot;type&quot;: &quot;game&quot;,
      &quot;basegame_id&quot;: null
  }
  </code></pre>
  <pre><code>appdevData.json
  {
      &quot;count&quot;: 1,
      &quot;next&quot;: null,
      &quot;previous&quot;: null,
      &quot;results&quot;: [
          {
              &quot;app_dev_id&quot;: 76,
              &quot;app&quot;: &quot;Django-server-url&quot;,
              &quot;developer&quot;: {
                  &quot;developer_id&quot;: 65,
                  &quot;name&quot;: &quot;SMILE&quot;
              }
          }
      ]
  }
  </code></pre>
  <p>but still there is print issue with results[] array.
  here is my error code.</p>
  <pre><code>// with appdevData.results[0].developer.name
  Cannot read properties of undefined (reading '0')
  </code></pre>
  <p>I've been trying to fix with map func, and props components and still have problem with it.</p>
  <p>I know it's a simple array print out issue, but I can't find a way to fix this error.</p>
  <p>plz help me.</p>