Skip to content

Instantly share code, notes, and snippets.

@LloydBlv
Created April 7, 2024 04:45
Show Gist options
  • Save LloydBlv/22d2a02330a2c831fab81f84c357bc66 to your computer and use it in GitHub Desktop.
Save LloydBlv/22d2a02330a2c831fab81f84c357bc66 to your computer and use it in GitHub Desktop.
Bad practice of exposing mutable state flow from viewmodel
class RatesViewModel constructor(
private val ratesRepository: RatesRepository,
) : ViewModel() {
val state = MutableStateFlow(RatesUiState(isLoading = true))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment