sycamore::web

Function WrapAsync

pub fn WrapAsync<F>(f: impl FnOnce() -> F + 'static) -> View
where F: Future<Output = View>,
Expand description

Convert an async component to a regular sync component. Also wraps the async component inside a suspense scope so that content is properly suspended.