videoSearch(term){
        YTSearch({key: API_KEY, term: term}, videos => {
            this.setState({
                videos: videos,
                selectedVideo: videos[0]
            })
            //this.setState({videos}); //If Key and Properties are the same
            //this.setState({ videos: videos });
        });
    }
//Create a new method for YTSearch
Create a new method for YTSearch
Create a new method for YTSearch
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 ] } ) } ) ; }
Create a new method for YTSearch
Create a new method for YTSearch
//this.setState({videos}); //If Key and Properties are the same //this.setState({ videos: videos });