Function leptos_use::use_document_visibility

source ·
pub fn use_document_visibility() -> Signal<VisibilityState>
Expand description

Reactively track document.visibilityState

§Demo

Link to Demo

§Usage

let visibility = use_document_visibility();

§Server-Side Rendering

On the server this returns a Signal that always contains the value web_sys::VisibilityState::Hidden.