Closed regmoraes closed 6 years ago
We already had this discussion. I would prefer to not be that opinionated about certain things i.e. naming it render()
Rômulo Eduardo Garcia Moraes notifications@github.com schrieb am Do., 29. Juni 2017, 04:37:
Actualy, if we want to use the MVI library, we should make the View ( Activities and Fragments) implements the MvpView interface https://github.com/sockeqwe/mosby/blob/master/mvp-common/src/main/java/com/hannesdorfmann/mosby3/mvp/MvpView.java, and be sure to create and implement the render method, which takes a ViewState as parameter.
How about create a MviView typed interface that has a render(Type viewState) and extends MvpView? This way, every time we make a View implement the proposed MviView it's forced to override the render method.
Sugestion of implementation
public interface MviView
extends MvpView { public void render(VS viewstate);
}
Usage example
public class MainActivity extends Activity implements MviView
{ (...)
public void render(SomeViewState viewstate){
} }
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/258, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrnIfkQczbb6AX3VC8fkK0QT_qIaSks5sIw3cgaJpZM4OIwgf .
Actualy, if we want to use the MVI library, we should make the View ( Activities and Fragments) implements the MvpView interface, and be sure to create and implement the render method, which takes a ViewState as parameter.
How about create a MviView typed interface that has a
render(Type viewState)
and extends MvpView? This way, every time we make a View implement the proposed MviView it's forced to override therender
method.Sugestion of implementation
Usage example