use_invoke_with_args

Function use_invoke_with_args 

Source
pub fn use_invoke_with_args<Args, T>(
    cmd: &'static str,
) -> UseTauriWithReturn<Args, T>
where Args: Serialize + Clone + Send + Sync + 'static, T: DeserializeOwned + Clone + Send + Sync + 'static,
Expand description

An alias function of use_invoke without options

#[component]
pub fn Demo() -> impl IntoView {
    let UseTauriWithReturn { 
        data: demo, 
        trigger: delete,
        ..
    } = use_invoke_with_args::<IdWrapper, ()>("delete_data");;
     
    view!{
        ...
        <button on:click=move |_| delete.set(Some(IdWrapper::new(id)))>delete data</button>
        ...
    }
}