/binder.kt Secret
Created
January 23, 2020 19:09
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
val eventToWish: (Event) -> Wish = { | |
when (it) { | |
is ButtonClick -> Increment | |
} | |
} | |
val stateToModel: (State) -> ViewModel = { | |
ViewModel(text = state.counter.toString()) | |
} | |
Binder().apply { | |
bind(view to feature using eventToWish) | |
bind(feature to view using stateToModel) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment