feat: none return works
This commit is contained in:
1 parent
244ade048e
commit
d8aa9f032a
3 files changed
+37
-30
No files matched your search
@@ -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");
|
||||
|
||||
|
||||
Reference in new issue
Block a user