Last active
April 24, 2020 19:19
-
-
Save rosschapman/06ec9df11283539a34cdf7526a78a202 to your computer and use it in GitHub Desktop.
Typed user actions object
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
type UserAction = "SUBMIT_FORM"; | |
type UserActions = { | |
[key: string]: UserAction; | |
}; | |
class AppConductor extends React.Component<Props, State> { | |
readonly userActions: UserActions = { | |
submitForm: "SUBMIT_FORM" | |
}; | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment