src/index.js
// call api and get video data - return a list of videos
call api and get video data - return a list of videos
call api and get video data - return a list of videos
videoSearch(term) {
        YTSearch({key: API_KEY, term: term}, (videos) => {
            this.setState({ 
                videos: videos,
                selectedVideo: videos[0],
            });
        });
    }
videoSearch ( term ) { YTSearch ( { key : API_KEY , term : term } , ( videos ) => { this . setState ( { videos : videos , selectedVideo : videos [ 0 ] , } ) ; } ) ; }
call api and get video data - return a list of videos
call api and get video data - return a list of videos