leptos_useFunction 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
.