Skip to content

Instantly share code, notes, and snippets.

@uteke
Last active September 1, 2023 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uteke/3374e9a15fd25434c86c66cd5ad8c6d2 to your computer and use it in GitHub Desktop.
Save uteke/3374e9a15fd25434c86c66cd5ad8c6d2 to your computer and use it in GitHub Desktop.
Sealed view state
sealed interface ViewState {
data object Loading : ViewState
data object Empty : ViewState
data class Content(
val users: List<UserState>,
) : ViewState
data class Error(
val message: String,
) : ViewState
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment