kwebio/kweb-core

Support for coroutines and flows

sollecitom opened this issue · 3 comments

Hey there, I'm playing with KWeb these days and it's pretty cool, great job!

One thing I'd wish was there is support for coroutines and flows. Being able to suspend inside the buildPage function, and having suspending listener functions, so that we could propagate events outside of the components where these events are generated.

An example would be:

val searchBar = SomeSearchBarComponent()
launch { searchbar.changes.onEach { (old, new) ->
val results = suspendRetrieveResults(new)
searchBar.resultsArea.display(results)
}.collect())

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

sanity commented

Hmm, I'm not sure what would prevent you from doing this now.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.