Created
November 19, 2018 19:49
-
-
Save productioncoder/8585f9a03abf1427a9c73247ce7bd821 to your computer and use it in GitHub Desktop.
Youtube in React: search for videos worker saga
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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