Last active
December 14, 2018 01:41
-
-
Save glendaviesnz/27de85cd43d4651928e14367916dc813 to your computer and use it in GitHub Desktop.
Object literal declaration of component state
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
const componentStates = { | |
name: 'userApproval', | |
states: { | |
[actionTypes.loadUnapprovedUsers]: { | |
[ComponentStates.Idle]: { to: ComponentStates.Processing, action: PassthroughAction } | |
}, | |
[actionTypes.loadUnapprovedUsersSuccess]: { | |
[ComponentStates.Processing]: { to: ComponentStates.Idle, action: PassthroughAction } | |
}, | |
[actionTypes.loadUnapprovedUsersError]: { | |
[ComponentStates.Processing]: { to: ComponentStates.Idle } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment