Skip to content

Instantly share code, notes, and snippets.

@GuilhE

GuilhE/FSM.kt Secret

Created February 4, 2022 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GuilhE/2e840585355a9a492543abfdec6c2cdb to your computer and use it in GitHub Desktop.
Save GuilhE/2e840585355a9a492543abfdec6c2cdb to your computer and use it in GitHub Desktop.
Medium articles - MVI+FSM
val stateMachine = StateMachine.create<State, Event, SideEffect> {
initialState(State)
state<State> {
on<Event> {
transitionTo(State, SideEffect)
}
//more events
}
//more states
onTransition {
//process side effects
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment