diff --git a/examples/counter_without_macros/Cargo.toml b/examples/counter_without_macros/Cargo.toml index 6c626a934..9b22121de 100644 --- a/examples/counter_without_macros/Cargo.toml +++ b/examples/counter_without_macros/Cargo.toml @@ -9,7 +9,7 @@ codegen-units = 1 lto = true [dependencies] -leptos = { path = "../../leptos" } +leptos = { path = "../../leptos", features = ["csr"] } console_error_panic_hook = "0.1.7" [dev-dependencies] diff --git a/examples/counter_without_macros/src/lib.rs b/examples/counter_without_macros/src/lib.rs index 128c8dce2..2881f6bfa 100644 --- a/examples/counter_without_macros/src/lib.rs +++ b/examples/counter_without_macros/src/lib.rs @@ -8,6 +8,9 @@ use leptos::{ // A component is really just a function call: it runs once to create the DOM and reactive system pub fn counter(initial_value: i32, step: u32) -> impl IntoView { let count = RwSignal::new(Count::new(initial_value, step)); + Effect::new(move |_| { + leptos::logging::log!("count = {:?}", count.get()); + }); // the function name is the same as the HTML tag name div() @@ -48,6 +51,7 @@ impl Count { } pub fn value(&self) -> i32 { + leptos::logging::log!("value = {}", self.value); self.value }