Przeglądaj źródła

Merge pull request #357 from mrxiaozhuox/patch-1

Jon Kelley 3 lat temu
rodzic
commit
510f07bcec
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      docs/guide/src/state/localstate.md

+ 1 - 1
docs/guide/src/state/localstate.md

@@ -19,8 +19,8 @@ cx.render(rsx!{
     ul {
     ul {
         todos.read().iter().enumerate().map(|(id, todo)| rsx!{
         todos.read().iter().enumerate().map(|(id, todo)| rsx!{
             li {
             li {
+                onhover: move |_| *todos.write()[id].is_hovered = true,
                 h1 { "{todo.contents}" }
                 h1 { "{todo.contents}" }
-                onhover: move |_| *todos.write()[id].is_hovered = true;
             }
             }
         })
         })
     }
     }