Minor Bugfixes

This commit is contained in:
2026-04-28 20:42:18 +02:00
parent ce86d8bc8f
commit dac2d91213
7 changed files with 111 additions and 20 deletions

View File

@@ -0,0 +1,30 @@
use yew::prelude::*;
#[component(Home)]
pub fn home_component() -> Html {
let counter = use_state(|| 0);
let onclick = {
let counter = counter.clone();
move |_| {
let value = *counter + 1;
counter.set(value);
}
};
html! {
<div>
<button {onclick}>{ "+1" }</button>
<p>{ *counter }</p>
</div>
}
}
#[component(NotFound)]
pub fn not_found_component() -> Html {
let message = "404 Not found";
html! {
<div>
<h1>{&message}</h1>
</div>
}
}

View File

@@ -0,0 +1 @@
pub mod basic_pages;