Created
October 18, 2021 15:16
-
-
Save volodymyr-sch/024693814785ccbfabc41e5c5c6b1742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Not ok | |
| sealed class MyState { | |
| object ShowProgressBar: MyState() | |
| data class ShowDataWithError(val error: Throwable?, val data: List<Item>): MyState() | |
| } | |
| //Good | |
| data class MyState( | |
| val isShowProgress: Boolean = false, | |
| val error: Throwable? = null, | |
| val data: List<Item> | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment