ac525fe572
req: client_local/001\nreq: client_local/004\nreq: client_local/006\nreq: client_local/007\nreq: client_local/008\nreq: client_local/009\nreq: client_local/010\nreq: client_local/014\nreq: security/002\nreq: security/006\nreq: v1_release/001\nreq: v1_release/008
23 lines
523 B
Rust
23 lines
523 B
Rust
#[hemx::surface]
|
|
pub mod ui {}
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
#[derive(hemplate::Hemplate)]
|
|
pub struct ClientLocal;
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub fn render_fixture() -> hemx::Html {
|
|
ui::client_local::render(&ClientLocal)
|
|
}
|
|
|
|
#[hemx::handler(client)]
|
|
pub fn increment(
|
|
event: hemx::wasm::ClientEvent,
|
|
state: hemx::wasm::ClientState,
|
|
) -> impl hemx::IntoEffect {
|
|
ui::client_local::counter_panel.text(format!(
|
|
"updated by Rust/WASM ({}, {})",
|
|
event.kind, state.encoded
|
|
))
|
|
}
|