title: Unhandled Rejection (TypeError): Cannot read property 'items' of undefined
body: <p>I've been doing use a Youtube-API but I don't know why this error occurs.</p>
  
  <p>I've already looked up unhandled rejected and I understood what's meaning was. but I could not solve 
    this problem yet.</p>
  
  <p>Material that I used </p>
  
  <ul>
  <li>React</li>
  <li><p>material-Ui</p>
  
  <p>Could you confirm my error? </p></li>
  </ul>
  
  <p>App.js </p>
  
  <pre><code>import React from 'react';
  import { Grid } from '@material-ui/core';
  import   SearchBar  from './components/SearchBar/SearchBar';
  import   VideoList  from './components/VideoList';
  import  VideoDetail  from './components/VideoDetail/VideoDetail';
  
  import youtube from './api/youtube';
  
  class App extends React.Component {
  
    state = {
      video: [],
      selectedVideo: null
    }
  
    handleSubmit = async (searchTerm) =&gt; {
      const response = await youtube.get('search', {
        params: {
          part: 'snippet',
          maxResults: 5,
          key:'Youtube api',
          q: searchTerm,
        }
      });
      this.setState({video: response.date.items, selectedVideo: response.data.items[0] 
     });
   }
  
  
    render (){
  
      const {selectedVideo} = this.state;
      return(
       &lt;Grid justify="center" container spacing={10}&gt;
         &lt;Grid item  xs={11}&gt;
           &lt;Grid container spacing={10}&gt;
            &lt;Grid item xs={12}&gt;      
              &lt;SearchBar onFormSubmit={this.handleSubmit}/&gt;
            &lt;/Grid&gt;
            &lt;Grid item xs={8}&gt;
              &lt;VideoDetail video={selectedVideo}/&gt;
            &lt;/Grid&gt;
            &lt;Grid item xs={4}&gt;
              &lt;VideoList /&gt;
            &lt;/Grid&gt;
           &lt;/Grid&gt;
         &lt;/Grid&gt;
       &lt;/Grid&gt;
      );
    }
  }
  export default App;
  </code></pre>
  
  <hr>
  
  <h2>This is screen shoot.</h2>
  
  <p><a href="https://i.stack.imgur.com/sdLyY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sdLyY.png" alt="enter image description here"></a></p>