Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 19, 2018 19:49
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/8585f9a03abf1427a9c73247ce7bd821 to your computer and use it in GitHub Desktop.
Save productioncoder/8585f9a03abf1427a9c73247ce7bd821 to your computer and use it in GitHub Desktop.
Youtube in React: search for videos worker saga
import * as api from '../api/youtube-api';
import {fetchEntity} from './index';
export function* searchForVideos(searchQuery, nextPageToken, amount) {
const request = api.buildSearchRequest.bind(null, searchQuery, nextPageToken, amount);
yield fetchEntity(request, searchActions.forVideos, searchQuery);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment