Skip to content

Commit

Permalink
add a generic example
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj committed Oct 3, 2024
1 parent e2f096d commit f9731e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/server_fns_axum/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use server_fn::{
request::{browser::BrowserRequest, ClientReq, Req},
response::{browser::BrowserResponse, ClientRes, Res},
};
use std::future::Future;
#[cfg(feature = "ssr")]
use std::sync::{
atomic::{AtomicU8, Ordering},
Mutex,
};
use std::{fmt::Display, future::Future};
use strum::{Display, EnumString};
use wasm_bindgen::JsCast;
use web_sys::{FormData, HtmlFormElement, SubmitEvent};
Expand Down Expand Up @@ -103,9 +103,9 @@ pub fn Generic() -> impl IntoView {
<p>"Open your browser devtools to see which endpoints the function below calls."</p>
<button on:click=move |_| {
spawn_local(async move {
test_fn("foo".to_string()).await;
test_fn(42).await;
test_fn(3.14).await;
test_fn("foo".to_string()).await.unwrap();
test_fn(42).await.unwrap();
test_fn(10.16).await.unwrap();
});
}>

Expand Down

0 comments on commit f9731e3

Please sign in to comment.