on master help sign in
Fix variables creation convention in counter example
commitbc05cd3c3c122b5d2ad313f86c26a1b22f766024 authorMichal <ndwz123@gmail.com> dateMon 22 Apr 2019, 19:16 (8 years ago) parent2be0c47
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("-")])