on master help sign in
Merge pull request #60 from MichalObi/fix/examples-counter-decrement

Fix variables creation convention in counter example

commit19718f886359508011edf62980a9315b9b7f8cde authorNick Fitzgerald <fitzgen@gmail.com> dateMon 22 Apr 2019, 11:35 (8 years ago) parent2be0c47bc05cd3
1 file changed+2−1
examples/counter/src/lib.rs+2−1
examples/counter/src/lib.rsmode 100644 → 100755+2−1
@@ -54,7 +54,8 @@ impl Render for Counter {
5454 button(&cx)
5555 .on("click", |root, vdom, _event| {
5656 // Same as above, but decrementing instead of incrementing.
57− root.unwrap_mut::<Counter>().decrement();
57+ let counter = root.unwrap_mut::<Counter>();
58+ counter.decrement();
5859 vdom.schedule_render();
5960 })
6061 .children([text("-")])