Add frondend project

This commit is contained in:
2026-03-30 20:52:35 -04:00
parent 0483588af5
commit a21c8f5b70
8 changed files with 1851 additions and 0 deletions

24
frontend/src/main.rs Normal file
View File

@@ -0,0 +1,24 @@
use yew::prelude::*;
#[component]
fn App() -> 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>
}
}
fn main() {
yew::Renderer::<App>::new().render();
}