dioxus::ssr::render_lazy panics when giving it an empty component, see this small example
#[cfg(test)]
mod tests {
use dioxus::prelude::*;
fn TestEl(cx: Scope) -> Element {
None
}
#[test]
fn it_works() {
let html = rsx! {
div {
TestEl {}
}
};
let result = dioxus::ssr::render_lazy(html);
}
}
fails with
---- tests::it_works stdout ----
thread 'tests::it_works' panicked at 'called `Option::unwrap()` on a `None` value', /home/sam/.cargo/git/checkouts/dioxus-1e619ce595d3799d/90a3093/packages/ssr/src/lib.rs:276:45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
dioxus::ssr::render_lazy
panics when giving it an empty component, see this small examplefails with