Skip to content

Instantly share code, notes, and snippets.

@davidedelpapa
Created July 25, 2020 13:10
Show Gist options
  • Save davidedelpapa/c37f0bc16cedcc4b0aa2d7f9857b71ee to your computer and use it in GitHub Desktop.
Save davidedelpapa/c37f0bc16cedcc4b0aa2d7f9857b71ee to your computer and use it in GitHub Desktop.
fn view(&self) -> Html {
html! {
<div>
<p> {"Counter: "} { self.counter }</p>
<button onclick=self.link.callback(|_| Msg::AddOne)>{ "Add 1" }</button>
<button onclick=self.link.callback(|_| Msg::RemoveOne)>{ "Remove 1" }</button>
</div>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment