Macro dioxus_core::to_owned
source · [−]macro_rules! to_owned {
($($es:ident),+) => { ... };
}Expand description
A helper macro for using hooks in async environements.
Usage
let (data) = use_ref(&cx, || {});
let handle_thing = move |_| {
to_owned![data]
cx.spawn(async move {
// do stuff
});
}