Aleksandr Davliatov
12/25/2023, 12:27 PMrunBlocking
works, but it doesn’t on work on web.
I tries to use
expect fun httpClient() ...
...
val scope = rememberCoroutineScope()
val someVal = remember { mutableStateOf(listOf<ValueView>()) }
OutlinedTextField(
value = someVal,
onValueChange = {
someVal = someVal
scope.launch {
val values = <http://httpClient.post|httpClient.post> { ... }
log.i("Values") { values }
someVal.value = values.first()
}
},
label = { Text("Val") },
)
But it seems it doesn’t make a request at all. I can not call .await
because it is suspended
. Any ideas, please??Cheick Kante
12/28/2023, 7:38 PM