Function leptos_use::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.