feat: none return works

This commit is contained in:
Jonathan Kelley committed 2022-12-23 19:33:15 -05:00
1 parent 244ade048e
commit d8aa9f032a
3 files changed
+37 -30

No files matched your search

+9 -1
View File
@@ -6,16 +6,24 @@ fn catches_panic() {
let mut dom = VirtualDom::new(app);
let a = dom.rebuild();
dbg!(a);
}
fn app(cx: Scope) -> Element {
cx.render(rsx! {
div {
PanicChild {}
h1 { "Title" }
NoneChild {}
}
})
}
fn NoneChild(cx: Scope) -> Element {
None
}
fn PanicChild(cx: Scope) -> Element {
panic!("Rendering panicked for whatever reason");