Less clumsy configuration for desktop and mobile (#553)
* chore: dont use prebuilt builder pattern for configuring desktop * chore: use regular config pattern for web * Chore: update docs too * chore: clean up some warnings
This commit is contained in:
1 parent
41b450eedf
commit
540e785d8b
28 files changed
+172
-156
No files matched your search
@@ -10,12 +10,13 @@
|
||||
//! proof-of-concept for the hydration feature, but you'll probably only want to use hydration for the web.
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_desktop::Config;
|
||||
|
||||
fn main() {
|
||||
let vdom = VirtualDom::new(app);
|
||||
let content = dioxus_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, Config::new().with_prerendered(content));
|
||||
}
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
|
||||
Reference in new issue
Block a user