pub fn use_window_width(cx: &ScopeState) -> &UseWindowWidthExpand description
hooks for window’s width
§Arguments
returns: UseWindowWidth
§Examples
use dioxus::prelude::*;
use dioxus_use_window::use_window_width;
fn App(cx: Scope) -> Element {
let width = use_window_width(&cx);
cx.render(rsx!(
h1 { "Window width: {width}" }
))
}