Function none

Source
pub fn none() -> Element
Expand description

Renders nothing. Useful fo conditional rendering.

ยงExample

use fun_html::{Element, elt::{text, none}};

let say_hello = true;
let element: Element = if say_hello {
  text("Hello")
} else {
  none()
};