minor refactoring

This commit is contained in:
Alexander Nozik 2022-11-17 21:23:47 +03:00
parent 4e24213428
commit 014d45f19f
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -43,11 +43,9 @@ suspend fun main() {
rsocket.fireAndForget(buildPayload { data(Json.encodeToString(event)) })
}
var count: Int by mutableStateOf(0)
renderComposable(rootElementId = "root") {
val scope = rememberCoroutineScope()
var count: Int by remember{ mutableStateOf(0)}
fun setCount(value: Int) {
count = value
@ -62,7 +60,7 @@ suspend fun main() {
if (event is CounterDataEvent) {
count = event.value
}
}.launchIn(scope)
}.launchIn(this)
}
Div({ style { padding(25.px) } }) {