leptos_useFunction use_window_focus
Source pub fn use_window_focus() -> Signal<bool>
Expand description
Reactively track window focus
with window.onfocus
and window.onblur
events.
§Demo
Link to Demo
§Usage
let focused = use_window_focus();
§Server-Side Rendering
On the server this returns a Signal
that is always true
.