Created
August 8, 2021 03:48
-
-
Save qvil/0e272440648e3bcf068cd07c6229f184 to your computer and use it in GitHub Desktop.
Example actions for request, success, failure pattern
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
const GET_DATA_REQUEST = "GET_DATA_REQUEST"; | |
const GET_DATA_SUCCESS = "GET_DATA_SUCCESS"; | |
const GET_DATA_FAILURE = "GET_DATA_FAILURE"; | |
const getDataRequest = (data) => ({ | |
type: GET_DATA_REQUEST, | |
data, | |
}); | |
const getDataSuccess = (data) => ({ | |
type: GET_DATA_SUCCESS, | |
data, | |
}); | |
const getDataFailure = (data) => ({ | |
type: GET_DATA_FAILURE, | |
data, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment