Leptos-Use Guide

is_none

Reactive Option::is_none().

Usage

use leptos::prelude::*;
use leptos_use::is_none;

#[component]
fn Demo() -> impl IntoView {
let (example, set_example) = signal(
    if js_sys::Math::random() < 0.5 { Some("Example") } else { None }
);

let is_empty = is_none::<_, &str>(example);

view! { }
}

Feature

This function is only available if the crate feature is_none is enabled

Source

SourceDocs