You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd prefer to keep things stateless if possible
A Stream is perfect for that but too much work
So keeping the state for click events
But can't make up my mind between the Interactor and the Presenter
Any recommendations?
A typical Interactor:
override fun didBecomeActive() {
super.didBecomeActive()
getDataAsync()
.subscribe { theData ->
// to keep theData as state here or not?
presenter.present(theData) // or inside the Presenter? 🤔
}
}
// upon user click, we need to theData again
fun onClick(theData: TheDataType) {
}
The text was updated successfully, but these errors were encountered:
Actually to better utilize unidirectional data flow you should not make the presenter api imperative.
Loading your asyncData to a state store like https://reduxkotlin.org/ is a better option then you can monitor that into the presenter usually after transforming it first to a viewmodel.
If you follow the clean architecture paradigm this looks as such
I'd prefer to keep things stateless if possible
A Stream is perfect for that but too much work
So keeping the state for click events
But can't make up my mind between the Interactor and the Presenter
Any recommendations?
A typical Interactor:
The text was updated successfully, but these errors were encountered: