fix all broken examples (#1248)
This commit is contained in:
1 parent
6751d5941b
commit
d637ef187c
12 files changed
+29
-25
No files matched your search
@@ -13,7 +13,8 @@ use dioxus::prelude::*;
|
||||
use dioxus_desktop::Config;
|
||||
|
||||
fn main() {
|
||||
let vdom = VirtualDom::new(app);
|
||||
let mut vdom = VirtualDom::new(app);
|
||||
let _ = vdom.rebuild();
|
||||
let content = dioxus_ssr::pre_render(&vdom);
|
||||
|
||||
dioxus_desktop::launch_cfg(app, Config::new().with_prerendered(content));
|
||||
|
||||
@@ -48,7 +48,7 @@ fn app(cx: Scope) -> Element {
|
||||
let read = div_element.read();
|
||||
let client_rect = read.as_ref().map(|el| el.get_client_rect());
|
||||
if let Some(client_rect) = client_rect {
|
||||
if let Ok(rect) = client_rect.await {
|
||||
if let Ok(rect) = dbg!(client_rect.await) {
|
||||
dimentions.set(rect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//! will cause it to fetch a random dog image from the Dog API. Since the data
|
||||
//! is not ready immediately, we render some loading text.
|
||||
//!
|
||||
//! We can achieve the majoirty of suspense functionality by composing "suspenseful"
|
||||
//! We can achieve the majority of suspense functionality by composing "suspenseful"
|
||||
//! primitives in our own custom components.
|
||||
|
||||
use dioxus::prelude::*;
|
||||
|
||||
Reference in new issue
Block a user