Youtube in React: search action creator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const SEARCH_FOR_VIDEOS = createRequestTypes('SEARCH_FOR_VIDEOS'); | |
export const forVideos = { | |
request: (searchQuery, nextPageToken, amount) => createAction(SEARCH_FOR_VIDEOS[REQUEST], {searchQuery, nextPageToken, amount}), | |
success: (response, searchQuery) => createAction(SEARCH_FOR_VIDEOS[SUCCESS], {response, searchQuery}), | |
failure: (response, searchQuery) => createAction(SEARCH_FOR_VIDEOS[FAILURE], {response, searchQuery}), | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment