Last active
August 6, 2020 01:49
-
-
Save Rajatgms/87b256f78f14ddf5cdf889f07fec68e7 to your computer and use it in GitHub Desktop.
actionCreator
This file contains hidden or 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 NOTIFY_SUCCESS = 'NOTIFY_SUCCESS'; | |
export const NOTIFY_ERROR = 'NOTIFY_ERROR'; | |
export const NOTIFY_RESET = 'NOTIFY_RESET'; | |
export const notifySuccessAction = payload => ({ type: NOTIFY_SUCCESS, payload }); | |
export const notifyErrorAction = payload => ({ type: NOTIFY_ERROR, payload }); | |
export const notifyResetAction = () => ({ type: NOTIFY_RESET }); |
This file contains hidden or 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
import { createAction } from '@reduxjs/toolkit'; | |
export const notifySuccessAction = createAction('NOTIFY_SUCCESS'); | |
export const notifyErrorAction = createAction('NOTIFY_ERROR'); | |
export const notifyResetAction = createAction('NOTIFY_RESET'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment