Created
July 31, 2022 18:27
-
-
Save motorro/85247c19a8b3ef592ad45147f4846bb3 to your computer and use it in GitHub Desktop.
Injecting use-case to your state
This file contains 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
class CredentialsCheckState(private val checkCredentials: CheckCredentials) { | |
// State logic | |
override fun doStart() { | |
stateScope.launch { | |
// Runs use-case | |
val valid = checkCredentials() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment