initial working

This commit is contained in:
2023-01-28 00:22:59 +01:00
commit 0cd75a9ff5
26 changed files with 3995 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
use yew::prelude::*;
#[function_component]
fn App() -> Html {
let counter = use_state(|| 5);
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();
}