Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created November 18, 2018 13:52
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/2d246d222b706b7a3e5746639f2531ff to your computer and use it in GitHub Desktop.
Save productioncoder/2d246d222b706b7a3e5746639f2531ff to your computer and use it in GitHub Desktop.
Youtube in React: most popular videos action creator
export const MOST_POPULAR = createRequestTypes('MOST_POPULAR');
export const mostPopular = {
request: (amount, loadDescription, nextPageToken) => createAction(MOST_POPULAR[REQUEST], {amount, loadDescription, nextPageToken}),
success: (response) => createAction(MOST_POPULAR[SUCCESS], {response}),
failure: (response) => createAction(MOST_POPULAR[FAILURE], {response}),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment