Skip to content

Instantly share code, notes, and snippets.

Last active Nov 2, 2018
What would you like to do?
Youtube Watch component action creator
import {createAction, createRequestTypes, FAILURE, REQUEST, SUCCESS} from './index';
export const WATCH_DETAILS = createRequestTypes('WATCH_DETAILS');
export const details = {
request: (videoId) => createAction(WATCH_DETAILS[REQUEST], {videoId}),
success: (response) => createAction(WATCH_DETAILS[SUCCESS], {response}),
failure: (response) => createAction(WATCH_DETAILS[FAILURE], {response}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment