Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 24, 2018 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/60a7e4a0dcd387545a04589de1eb2fc6 to your computer and use it in GitHub Desktop.
Save productioncoder/60a7e4a0dcd387545a04589de1eb2fc6 to your computer and use it in GitHub Desktop.
Youtube in React: performing search for videos request
/* ... */
class Search extends React.Component {
/* ... */
searchForVideos() {
const searchQuery = this.getSearchQuery();
if(this.props.youtubeApiLoaded) {
this.props.searchForVideos(searchQuery);
}
}
}
/* ... */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment