macro_rules! AsyncFetch {
(fetcher = $fetcher:block producer = |$bound_variable:pat_param| $producer:block) => {{
use leptos::{
prelude::{ElementChild, LocalResource, Suspend, Transition},
view,
};
view! {
( // fetcher: impl Fn() -> Fut + 'static + Send + Sync, // producer: P, // ) -> impl IntoView // where // V: IntoView + 'static, // P: Fn(T) -> V + 'static + Send + Sync, // Fut: Future
} // }> // { || Suspend::new(async { // let value_resource = LocalResource::new( || fetcher()); // value_resource // .await // .map(|value| { // producer(value) // }) // })} // // } // }