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
Now we need directly use initializer of *Ks types to instantiate it. Their names could be so big, so to improve readability we could use this sort of construction to decrease usage of long type names. Example: Now:
class VeryBigNameOfViewModel {
sealed class State {
data class Success(val data : String, val someOtherData : Int) : State()
object Loading : State()
}
}
class Controller : UIViewController {
...
private func observeState(_ state : VeryBigNameOfViewModel.State) {
switch VeryBigNameOfViewModelStateKs(state) /*not pretty*/ { ...
}
}
Now we need directly use initializer of *Ks types to instantiate it. Their names could be so big, so to improve readability we could use this sort of construction to decrease usage of long type names. Example:
Now:
Wish:
Seems that it's not so hard)
The text was updated successfully, but these errors were encountered: