瀏覽代碼

Merge pull request #8 from jkelleyrtp/jk/diff_machine_own_vdom

Doc: change up example a bit
Jonathan Kelley 4 年之前
父節點
當前提交
e45b6e0aa2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -9,7 +9,7 @@ Dioxus is a portable, performant, and ergonomic framework for building cross-pla
 
 
 ```rust
 ```rust
 fn Example(ctx: Context<()>) -> VNodes {
 fn Example(ctx: Context<()>) -> VNodes {
-    let (selection, set_selection) = use_state(&ctx, move || "..?");
+    let (selection, set_selection) = use_state(&ctx, || "..?");
 
 
     ctx.render(rsx! {
     ctx.render(rsx! {
         h1 { "Hello, {selection}" }
         h1 { "Hello, {selection}" }