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:
Evan Almloff authored and GitHub committed 2025-10-27 11:39:48 -07:00
1 parent 3eecfaa0a7
commit e4297d0e09
13 files changed
+308 -33

No files matched your search

+1 -1
View File
@@ -175,7 +175,7 @@ fn TodoHeader(mut todos: Store<TodoState>) -> Element {
let mut todo_id = use_signal(|| 0);
let onkeydown = move |evt: KeyboardEvent| {
if evt.key() == Key::Enter && !draft.read().is_empty() {
if evt.key() == Key::Enter && !draft.is_empty() {
let id = todo_id();
let todo = TodoItem::new(draft.take());
todos.todos().insert(id, todo);