pub fn use_supported(
callback: impl Fn() -> bool + Send + Sync + 'static,
) -> Signal<bool>
Expand description
SSR compatibe is_supported
ยงUsage
let is_supported = use_supported(
|| js!("getBattery" in &window().navigator())
);
if is_supported.get() {
// do something
}