浏览代码

Update localstate.md

YuKun Liu 3 年之前
父节点
当前提交
c9537a4c41
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {
         todos.read().iter().enumerate().map(|(id, todo)| rsx!{
             li {
+                onhover: move |_| *todos.write()[id].is_hovered = true,
                 h1 { "{todo.contents}" }
-                onhover: move |_| *todos.write()[id].is_hovered = true;
             }
         })
     }