Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube fetch most popular videos actions
import {createAction, createRequestTypes, REQUEST, SUCCESS, FAILURE} from './index';
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