Created
May 15, 2017 16:52
-
-
Save ohager/8a9231e910b178a99a9861056108dee9 to your computer and use it in GitHub Desktop.
UserActionHandler for composition
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
import UserConstants from "../../constants/UserConstants" | |
function loadedUserType(payload, stateCursor){ | |
stateCursor.refine(["userTypes"]).data = payload.action.userTypes; | |
this.emitChange(); | |
} | |
const UserActionHandler = { | |
actions: { | |
[UserConstants.USERTYPE_LOAD_SUCCESS]: loadedUserType, | |
}, | |
initialState: { | |
userTypes: [] | |
} | |
}; | |
export default UserActionHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment