Whats the correct way to check state property ensu...
# orbit-mvi
r
Whats the correct way to check state property ensuring thread safety. For example
Copy code
data class MviState(val isChecked: Boolean)

Inside ViewModel ...

fun doSomething = intent {
   if(mviState.isChecked) {  --------------> how to ensure its thread safe here. (reduce block is thread safe) 
      postSideEffect(SideEffect.Something)
   }   
}
b
What do you mean thread safe? Reading a value is always thread safe. Writing isn't, but you're only reading here ­čÖé
­čÖĆ 1
r
cool