Skip to content

Instantly share code, notes, and snippets.

@htdangkhoa
Created December 1, 2019 15:54
Show Gist options
  • Save htdangkhoa/0e69ab515db9235c90d3da5d1dd2b667 to your computer and use it in GitHub Desktop.
Save htdangkhoa/0e69ab515db9235c90d3da5d1dd2b667 to your computer and use it in GitHub Desktop.
Action
sealed class CounterAction: Action {
object INCREASE: CounterAction()
object DECREASE: CounterAction()
companion object {
fun increaseAction(dispatch: Dispatch) = dispatch(INCREASE)
fun decreaseAction(dispatch: Dispatch) = dispatch(DECREASE)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment