use_permission
Reactive Permissions API.
Demo
Usage
use leptos::prelude::*;
use leptos_use_permission::use_permission;
#[component]
fn Demo() -> impl IntoView {
let microphone_access = use_permission("microphone");
view! { }
}
Server-Side Rendering
Make sure you follow the instructions in Server-Side Rendering.
On the server the returned signal will always be PermissionState::Unknown.
Installation
cargo add leptos-use-permission