浏览代码

docs: update readme

Jonathan Kelley 3 年之前
父节点
当前提交
e881b86d2e
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      README.md

+ 1 - 2
README.md

@@ -49,7 +49,7 @@
 Dioxus is a portable, performant, and ergonomic framework for building cross-platform user experiences in Rust.
 Dioxus is a portable, performant, and ergonomic framework for building cross-platform user experiences in Rust.
 
 
 ```rust
 ```rust
-fn App(cx: Context<()>) -> DomTree {
+static App: FC<()> = |cx, props| {
     let mut count = use_state(cx, || 0);
     let mut count = use_state(cx, || 0);
 
 
     cx.render(rsx!(
     cx.render(rsx!(
@@ -64,7 +64,6 @@ Dioxus can be used to deliver webapps, desktop apps, static sites, liveview apps
 
 
 If you know React, then you already know Dioxus.
 If you know React, then you already know Dioxus.
 
 
-
 ### Unique features:
 ### Unique features:
 - Incredible inline documentation. Supports hover and guides for all HTML elements, listeners, and events.
 - Incredible inline documentation. Supports hover and guides for all HTML elements, listeners, and events.
 - Templates are "constified" at compile time. Nodes that don't change will won't be diffed.
 - Templates are "constified" at compile time. Nodes that don't change will won't be diffed.