use_toggle
A boolean switcher with utility functions.
Demo
Usage
use leptos::*;
use leptos_use::{use_toggle, UseToggleReturn};
#[component]
fn Demo() -> impl IntoView {
let UseToggleReturn { toggle, value, set_value } = use_toggle(true);
view! { }
}
See also
Feature
This function is only available if the crate feature
use_toggle
is enabled