pub fn use_device_pixel_ratio() -> Signal<f64>Expand description
Reactive window.devicePixelRatio
NOTE: there is no event listener for
window.devicePixelRatiochange. So this function uses the same mechanism as described in this example.
§Demo
§Usage
let pixel_ratio = use_device_pixel_ratio();§Server-Side Rendering
Make sure you follow the instructions in Server-Side Rendering.
On the server this function returns a Signal that is always 1.0.