Skip to content

Commit

Permalink
fix: make prop serialization opt-in for devtools (closes #1952) (#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Nov 27, 2023
1 parent a8e25af commit 4e8c3ac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion leptos_dom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ ssr = ["leptos_reactive/ssr"]
nightly = ["leptos_reactive/nightly"]
nonce = ["dep:base64", "dep:getrandom", "dep:rand"]
experimental-islands = ["leptos_reactive/experimental-islands"]
trace-component-props = []

[package.metadata.cargo-all-features]
denylist = ["nightly"]
denylist = ["nightly", "trace-component-props"]
skip_feature_sets = [["web", "ssr"]]
1 change: 1 addition & 0 deletions leptos_dom/src/macro_helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod into_attribute;
mod into_class;
mod into_property;
mod into_style;
#[cfg(feature = "trace-component-props")]
#[doc(hidden)]
pub mod tracing_property;
pub use into_attribute::*;
Expand Down
3 changes: 2 additions & 1 deletion leptos_macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ ssr = ["server_fn_macro/ssr"]
nightly = ["server_fn_macro/nightly"]
tracing = []
experimental-islands = []
trace-component-props = []

[package.metadata.cargo-all-features]
denylist = ["nightly", "tracing"]
denylist = ["nightly", "tracing", "trace-component-props"]
skip_feature_sets = [["csr", "hydrate"], ["hydrate", "csr"], ["hydrate", "ssr"]]
2 changes: 1 addition & 1 deletion leptos_macro/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl ToTokens for Model {
#[cfg(debug_assertions)]
let _guard = span.entered();
},
if no_props {
if no_props || !cfg!(feature = "trace-component-props") {
quote! {}
} else {
quote! {
Expand Down

0 comments on commit 4e8c3ac

Please sign in to comment.