Renderer
Interface for transforming the current Loop model into a new view state.
For example:
class ScoreScreenRenderer : Renderer<ScoreScreenModel, ScoreScreenState> {
fun renderState(model: ScoreScreenModel) = ScoreScreenState(
playerName = model.user.nickname,
score = model.score.roundToInt().toString(),
)
}
Content copied to clipboard