use_window_height

Function use_window_height 

Source
pub fn use_window_height(cx: &ScopeState) -> &UseWindowHeight
Expand description

hooks for window’s height

§Arguments

returns: UseWindowHeight

§Examples

use dioxus::prelude::*;
use dioxus_use_window::use_window_height;

fn App(cx: Scope) -> Element {
    let height = use_window_height(&cx);

    cx.render(rsx!(
        h1 { "Window height: {height}" }
    ))
}