Skip to content

Instantly share code, notes, and snippets.

@MaxMichel2
Created April 30, 2024 11:04
Show Gist options
  • Save MaxMichel2/13972973d70a85a0c35d3eed9ffdc414 to your computer and use it in GitHub Desktop.
Save MaxMichel2/13972973d70a85a0c35d3eed9ffdc414 to your computer and use it in GitHub Desktop.
The interface defining the structure of a reducer in an MVI architecture in Android
interface Reducer<State : Reducer.ViewState, Event : Reducer.ViewEvent, Effect : Reducer.ViewEffect> {
interface ViewState
interface ViewEvent
interface ViewEffect
fun reduce(previousState: State, event: Event): Pair<State, Effect?>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment