Created
April 16, 2019 09:08
-
-
Save MeetMartin/e60ed58171852acf8c824ca513cfebf5 to your computer and use it in GitHub Desktop.
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
// src/store/actions.js | |
import {types} from '.reducers'; | |
export const useActions = (state, dispatch) => ({ | |
triggerAction: data => dispatch({ type: types.TRIGGER_ACTION, payload: data }) | |
}); |
How the state argument can be used here? Is there a reason to pass it through?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Small typo: