Readable and Writable helpers for String, HashMap and HashSet (#4834)
* Add more read/write methods for string signals * add helpers for HashMap and HashSet as well * fix typo * fix conflicting string and str extensions * fix counters example
This commit is contained in:
1 parent
3eecfaa0a7
commit
e4297d0e09
13 files changed
+308
-33
No files matched your search
@@ -19,8 +19,8 @@ fn app() -> Element {
|
||||
Stylesheet { href: STYLE }
|
||||
|
||||
div { id: "controls",
|
||||
button { onclick: move |_| counters.write().push(0), "Add counter" }
|
||||
button { onclick: move |_| { counters.write().pop(); }, "Remove counter" }
|
||||
button { onclick: move |_| counters.push(0), "Add counter" }
|
||||
button { onclick: move |_| { counters.pop(); }, "Remove counter" }
|
||||
}
|
||||
|
||||
h3 { "Total: {sum}" }
|
||||
@@ -47,7 +47,7 @@ fn app() -> Element {
|
||||
}
|
||||
}
|
||||
button { onclick: move |_| counters.write()[i] += 1, "+1" }
|
||||
button { onclick: move |_| { counters.write().remove(i); }, "x" }
|
||||
button { onclick: move |_| { counters.remove(i); }, "x" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user