Function leptos::create_server_action

source ยท
pub fn create_server_action<S>(
) -> Action<S, Result<<S as ServerFn>::Output, ServerFnError<<S as ServerFn>::Error>>>
where S: Clone + ServerFn, <S as ServerFn>::Error: Clone + 'static,
Expand description

Creates an Action that can be used to call a server function.


#[server(MyServerFn)]
async fn my_server_fn() -> Result<(), ServerFnError> {
    todo!()
}

let my_server_action = create_server_action::<MyServerFn>();