Skip to content

Instantly share code, notes, and snippets.

@davidedelpapa
Created July 25, 2020 13:10
Show Gist options
  • Save davidedelpapa/ba933e224192cc3ad41ae91bcb0c85dc to your computer and use it in GitHub Desktop.
Save davidedelpapa/ba933e224192cc3ad41ae91bcb0c85dc to your computer and use it in GitHub Desktop.
fn update(&mut self, msg: Self::Message) -> ShouldRender {
match msg {
Msg::AddOne => self.counter += 1,
Msg::RemoveOne => self.counter -= 1,
}
true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment