docs: remove all usages of static closure syntax and update readme

This commit is contained in:
Jonathan Kelley committed 2022-01-02 18:35:38 -05:00
1 parent d1560450ba
commit cafb7df736
66 files changed
+792 -2019

No files matched your search

+5 -4
View File
@@ -13,12 +13,13 @@ use dioxus::prelude::*;
use dioxus::ssr;
fn main() {
let vdom = VirtualDom::new(App);
let vdom = VirtualDom::new(app);
let content = ssr::render_vdom_cfg(&vdom, |f| f.pre_render(true));
dioxus::desktop::launch_cfg(App, |c| c.with_prerendered(content));
dioxus::desktop::launch_cfg(app, |c| c.with_prerendered(content));
}
static App: Component = |cx| {
fn app(cx: Scope) -> Element {
let val = use_state(&cx, || 0);
cx.render(rsx! {
@@ -30,4 +31,4 @@ static App: Component = |cx| {
}
}
})
};
}