feat: rebuild doesn't return errors
This commit is contained in:
1 parent
df8aa77198
commit
f457b71131
18 files changed
+233
-189
No files matched your search
@@ -5,7 +5,7 @@ use dioxus_html as dioxus_elements;
|
||||
|
||||
fn main() {
|
||||
let mut dom = VirtualDom::new(App);
|
||||
dom.rebuild().unwrap();
|
||||
dom.rebuild();
|
||||
println!(
|
||||
"{}",
|
||||
dioxus_ssr::render_vdom(&dom, |c| c.newline(true).indent(true))
|
||||
|
||||
@@ -19,7 +19,9 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
.map(|f| f.parse().unwrap_or("...?".to_string()))
|
||||
.unwrap_or("...?".to_string());
|
||||
|
||||
let dom = VirtualDom::launch_with_props_in_place(Example, ExampleProps { initial_name });
|
||||
let mut dom = VirtualDom::new_with_props(Example, ExampleProps { initial_name });
|
||||
|
||||
dom.rebuild();
|
||||
|
||||
Ok(Response::builder(200)
|
||||
.body(format!("{}", dioxus_ssr::render_vdom(&dom, |c| c)))
|
||||
|
||||
@@ -13,7 +13,8 @@ fn main() {
|
||||
let mut file = File::create("example.html").unwrap();
|
||||
|
||||
let mut dom = VirtualDom::new(App);
|
||||
dom.rebuild().expect("failed to run virtualdom");
|
||||
|
||||
dom.rebuild();
|
||||
|
||||
file.write_fmt(format_args!(
|
||||
"{}",
|
||||
|
||||
Reference in new issue
Block a user