Hello, I’m trying to find a replacement for `acto...
# multiplatform
d
Hello, I’m trying to find a replacement for
actor
, for implement a debounce operator. On jvm I would write ( I’ll skip something for simplicity ) :
Copy code
val result = MutableStateFlow(emptyList<Movie>)

val searchActor = scope.actor<String>(CONFLATED) {
  for (query in channel) {
    delay(250) // debounce
    result.value = searchMovie(query)
  }
}

// Outer world
launch { result.collect { ... } }
searchActor.send(query)
What would be a nice solution on KMP? Thank you
a
Looks like MVI. Maybe MVIKotlin would help?
d
Thank you, that a very nice project and the time-travel is crazy, but I prefer to solve without any framework