Created
February 22, 2021 20:03
-
-
Save AllGistsEqual/39e7b859b2553cfd1f513ada59060e3f to your computer and use it in GitHub Desktop.
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
// File: src/redux/ducks/article.ts | |
export const requestArticlesData = createAction( | |
'[ARTICLE] request data' | |
) | |
export const setArticlesStatus = createAction( | |
'[ARTICLE] set status', | |
(status: RequestStatus) => ({ payload: { status } }) | |
) | |
export const storeArticlesData = createAction( | |
'[ARTICLE] store data', | |
(data: Article[]) => ({ payload: { data } }) | |
) | |
export const cancelArticlesRequest = createAction( | |
'[ARTICLE] cancel failed request', | |
(error: string) => ({ payload: { error } }) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment