Function leptos_dom::is_browser
source · pub const fn is_browser() -> bool
Expand description
Returns true if running on the browser (CSR).
let todos = if is_browser() {
// if on the browser, call `wasm_bindgen` methods
} else {
// if on the server, do something else
};