Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 14, 2018 20:39
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/117d30b1ec5093524ed2d30d75b469a3 to your computer and use it in GitHub Desktop.
Save productioncoder/117d30b1ec5093524ed2d30d75b469a3 to your computer and use it in GitHub Desktop.
Youtube in React: passing along video id WATCH_DETAILS success action creator
export const WATCH_DETAILS = createRequestTypes('WATCH_DETAILS');
export const details = {
request: (videoId, channelId) => createAction(WATCH_DETAILS[REQUEST], {videoId, channelId}),
success: (response, videoId) => createAction(WATCH_DETAILS[SUCCESS], {response, videoId}),
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