leptos-use 0.13.11

Collection of essential Leptos utilities inspired by React-Use / VueUse / SolidJS-USE
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::env;

fn main() {
    let ssr = env::var("CARGO_FEATURE_SSR").is_ok();
    let wasm_ssr = env::var("CARGO_FEATURE_WASM_SSR").is_ok();
    let wasm32 = env::var("CARGO_CFG_TARGET_ARCH").expect("should be present in the build script")
        == "wasm32";
    if ssr && wasm32 && !wasm_ssr {
        println!(
            "cargo::warning=You have enabled the `ssr` feature for a wasm32 target. \
This is probably not what you want. Please check https://leptos-use.rs/server_side_rendering.html \
for how to use the `ssr` feature correctly.\n \
If you're building for wasm32 on the server you can enable the `wasm_ssr` feature to get rid of \
this warning."
        );
    }
}