Skip to main content

remember_coroutine_scope

Function remember_coroutine_scope 

Source
pub fn remember_coroutine_scope() -> CoroutineScope
Expand description

A coroutine scope bound to this call site. Compose’s rememberCoroutineScope.

ⓘ
let scope = remember_coroutine_scope();
Button("Refresh").on_click(move || scope.launch(async move {
    let fresh = with_worker(fetch).await;
    items.set(fresh);
}));