Function sauron::prelude::lazy_view_if

source ·
pub fn lazy_view_if<F, MSG>(flag: bool, fn_node: F) -> Node<MSG>
where F: Fn() -> Node<MSG>,
Expand description

evaluate the fn_node only if flag is true and return the evaluated Node