diff --git a/examples/lazy_routes/Cargo.toml b/examples/lazy_routes/Cargo.toml index c42445681..962e35370 100644 --- a/examples/lazy_routes/Cargo.toml +++ b/examples/lazy_routes/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib", "rlib"] axum = { version = "0.8.1", optional = true } console_error_panic_hook = "0.1.7" console_log = "1.0" -leptos = { path = "../../leptos", features = ["tracing"] } +leptos = { path = "../../leptos", features = ["tracing", "lazy"] } leptos_meta = { path = "../../meta" } leptos_axum = { path = "../../integrations/axum", optional = true } leptos_router = { path = "../../router" } diff --git a/tachys/src/view/any_view.rs b/tachys/src/view/any_view.rs index 77c4c9665..6c11f20c6 100644 --- a/tachys/src/view/any_view.rs +++ b/tachys/src/view/any_view.rs @@ -593,12 +593,11 @@ impl RenderHtml for AnyView { } #[cfg(all(feature = "hydrate", feature = "lazy"))] { - _ = cursor; - _ = position; - panic!( - "you have the `lazy` feature enabled, but are using regular \ - hydration; use `hydrate_lazy()` instead" - ); + use futures::FutureExt; + + (self.hydrate_async)(self.value, cursor, position) + .now_or_never() + .unwrap() } #[cfg(not(feature = "hydrate"))] {