Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube in React: video details for watch component
function* fetchVideoDetails(responses) {
const searchListResponse = responses.find(response => response.result.kind === SEARCH_LIST_RESPONSE);
const relatedVideoIds = =>;
const requests = => {
return buildVideoDetailRequest.bind(null, relatedVideoId);
try {
const responses = yield all( => call(fn)));
yield put(watchActions.videoDetails.success(responses));
} catch (error) {
yield put(watchActions.videoDetails.failure(error));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment