feat: allow 'static futures to be spawned from handlers
This commit is contained in:
1 parent
d0fb05385a
commit
9ebafc46bb
5 files changed
+38
-9
No files matched your search
@@ -8,7 +8,7 @@ macro_rules! impl_event {
|
||||
) => {
|
||||
$(
|
||||
$( #[$attr] )*
|
||||
pub fn $name<'a>(_cx: &'a ::dioxus_core::ScopeState, _f: impl FnMut(::dioxus_core::Event<$data>) + 'a) -> ::dioxus_core::Attribute<'a> {
|
||||
pub fn $name<'a, E: ::dioxus_core::EventReturn<T>, T>(_cx: &'a ::dioxus_core::ScopeState, _f: impl FnMut(::dioxus_core::Event<$data>) -> E + 'a) -> ::dioxus_core::Attribute<'a> {
|
||||
::dioxus_core::Attribute {
|
||||
name: stringify!($name),
|
||||
value: _cx.listener(_f),
|
||||
|
||||
Reference in new issue
Block a user