diff --git a/leptos/src/lib.rs b/leptos/src/lib.rs index e18a9c200..7da9aacc8 100644 --- a/leptos/src/lib.rs +++ b/leptos/src/lib.rs @@ -296,10 +296,17 @@ pub mod spawn { } } +// these reexports are used in islands +#[cfg(feature = "experimental-islands")] #[doc(hidden)] -pub use wasm_bindgen; // used in islands +pub use serde; +#[cfg(feature = "experimental-islands")] #[doc(hidden)] -pub use web_sys; // used in islands +pub use serde_json; +#[doc(hidden)] +pub use wasm_bindgen; +#[doc(hidden)] +pub use web_sys; /*mod additional_attributes; pub use additional_attributes::*; diff --git a/leptos_macro/src/component.rs b/leptos_macro/src/component.rs index 64e4e37aa..4d0538bf2 100644 --- a/leptos_macro/src/component.rs +++ b/leptos_macro/src/component.rs @@ -375,16 +375,15 @@ impl ToTokens for Model { } else { quote! {} }; - let deserialize_island_props = quote! {}; /*if is_island_with_other_props { - quote! { - let props = el.dataset().get("props") // TODO ::leptos::wasm_bindgen::intern("props")) - .and_then(|data| ::leptos::serde_json::from_str::<#props_serialized_name>(&data).ok()) - .expect("could not deserialize props"); - } - } else { - quote! {} - };*/ - // TODO + let deserialize_island_props = if is_island_with_other_props { + quote! { + let props = el.dataset().get(::leptos::wasm_bindgen::intern("props")) + .and_then(|data| ::leptos::serde_json::from_str::<#props_serialized_name>(&data).ok()) + .expect("could not deserialize props"); + } + } else { + quote! {} + }; quote! { #[::leptos::wasm_bindgen::prelude::wasm_bindgen(wasm_bindgen = ::leptos::wasm_bindgen)] diff --git a/tachys/Cargo.toml b/tachys/Cargo.toml index f8e2cf436..2bad95911 100644 --- a/tachys/Cargo.toml +++ b/tachys/Cargo.toml @@ -42,6 +42,7 @@ web-sys = { version = "0.3", features = [ "CssStyleDeclaration", "ShadowRoot", "HtmlCollection", + "DomStringMap", # Events we cast to in leptos_macro -- added here so we don't force users to import them "AddEventListenerOptions",