-
-
Notifications
You must be signed in to change notification settings - Fork 821
Closed
Description
- Update the
storesexample to do an untracked write when adding a todo:
diff --git a/examples/stores/src/lib.rs b/examples/stores/src/lib.rs
index b13aae37e..eb599c643 100644
--- a/examples/stores/src/lib.rs
+++ b/examples/stores/src/lib.rs
@@ -98,7 +98,7 @@ pub fn App() -> impl IntoView {
<hr/>
<form on:submit=move |ev| {
ev.prevent_default();
- store.todos().write().push(Todo::new(input_ref.get().unwrap().value()));
+ store.todos().write_untracked().push(Todo::new(input_ref.get().unwrap().value()));
}>
<label>"Add a Todo" <input type="text" node_ref=input_ref/></label>
<input type="submit"/>- Add a new todo
- The list in the DOM updates, but the stringified version in the
<pre>tag does not
Metadata
Metadata
Assignees
Labels
No labels