change operation
All checks were successful
/ test_checkout (push) Successful in 2m12s

This commit is contained in:
Jean-Marie Mineau 2024-03-13 18:01:41 +01:00
parent 9ce8e13a41
commit c10606e80e
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -2,18 +2,19 @@ use yew::prelude::*;
#[function_component]
fn App() -> Html {
let counter = use_state(|| 0);
let counter = use_state(|| 283870);
let onclick = {
let counter = counter.clone();
move |_| {
let value = *counter + 1;
let value = (*counter * 989_909) % 1_212_149;
counter.set(value);
}
};
html! {
<div>
<button {onclick}>{ "+1" }</button>
<h3>{ "Pseudo Random Generator" }</h3>
<button {onclick}>{ "next" }</button>
<p>{ *counter }</p>
</div>
}