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
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 the render method.
Sugestion of implementation
public interface MviView<VS> extends MvpView {
public void render(VS viewstate);
}
Usage example
public class MainActivity extends Activity implements MviView<SomeViewState> {
(...)
@Override
public void render(SomeViewState viewstate){
// Custom implementation
}
}
The text was updated successfully, but these errors were encountered:
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<VS> extends MvpView {
public void render(VS viewstate);
}
*Usage example*
public class MainActivity extends Activity implements MviView<SomeViewState> {
(...)
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
<#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
The text was updated successfully, but these errors were encountered: