diff --git a/examples/tailwind_csr/src/main.rs b/examples/tailwind_csr/src/main.rs
index dddb687af..494e1b2ad 100644
--- a/examples/tailwind_csr/src/main.rs
+++ b/examples/tailwind_csr/src/main.rs
@@ -1,15 +1,10 @@
mod app;
use app::*;
-use leptos::prelude::*;
+use leptos::{logging, mount};
pub fn main() {
- _ = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once();
-
logging::log!("csr mode - mounting to body");
-
- mount_to_body(|| {
- view! {
}
- });
+ mount::mount_to_body(App);
}
diff --git a/examples/todo_app_sqlite_axum/src/todo.rs b/examples/todo_app_sqlite_axum/src/todo.rs
index 9bd374792..d1fb4be7d 100644
--- a/examples/todo_app_sqlite_axum/src/todo.rs
+++ b/examples/todo_app_sqlite_axum/src/todo.rs
@@ -74,6 +74,7 @@ pub async fn add_todo(title: String) -> Result<(), ServerFnError> {
}
}
+#[server]
pub async fn delete_todo(id: u16) -> Result<(), ServerFnError> {
use self::ssr::*;
let mut conn = db().await?;
diff --git a/examples/todomvc/Cargo.toml b/examples/todomvc/Cargo.toml
index 8d301f6ae..7ea69921b 100644
--- a/examples/todomvc/Cargo.toml
+++ b/examples/todomvc/Cargo.toml
@@ -8,9 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["serde"] }
-log = "0.4"
-console_log = "1"
+leptos = { path = "../../leptos" }
console_error_panic_hook = "0.1.7"
uuid = { version = "1", features = ["v4", "js", "serde"] }
serde = { version = "1", features = ["derive"] }
@@ -23,8 +21,6 @@ wasm-bindgen-test = "0.3.0"
[features]
default = ["csr"]
csr = ["leptos/csr"]
-hydrate = ["leptos/hydrate"]
-ssr = ["leptos/ssr"]
[package.metadata.cargo-all-features]
skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]]
diff --git a/examples/todomvc/src/lib.rs b/examples/todomvc/src/lib.rs
index 2a8c1a7bd..2dd8b6a01 100644
--- a/examples/todomvc/src/lib.rs
+++ b/examples/todomvc/src/lib.rs
@@ -138,7 +138,7 @@ pub fn TodoMVC() -> impl IntoView {
// We provide a context that each
component can use to update the list
// Here, I'm just passing the `WriteSignal`; a
doesn't need to read the whole list
// (and shouldn't try to, as that would cause each individual
to re-render when
- // a new todo is added! This kind of hygiene is why `create_signal` defaults to read-write
+ // a new todo is added! This kind of hygiene is why `signal` defaults to read-write
// segregation.)
provide_context(set_todos);
@@ -201,7 +201,9 @@ pub fn TodoMVC() -> impl IntoView {
let json = serde_json::to_string(&todos)
.expect("couldn't serialize Todos");
if storage.set_item(STORAGE_KEY, &json).is_err() {
- log::error!("error while trying to set item in localStorage");
+ leptos::logging::error!(
+ "error while trying to set item in localStorage"
+ );
}
}
});
@@ -301,7 +303,6 @@ pub fn Todo(todo: Todo) -> impl IntoView {
let todo_input = NodeRef::
::new();
let save = move |value: &str| {
- leptos::tachys::log("saving...");
let value = value.trim();
if value.is_empty() {
set_todos.update(|t| t.remove(todo.id));
diff --git a/examples/todomvc/src/main.rs b/examples/todomvc/src/main.rs
index 877d75600..29a0d6200 100644
--- a/examples/todomvc/src/main.rs
+++ b/examples/todomvc/src/main.rs
@@ -1,7 +1,6 @@
-use leptos::prelude::*;
pub use todomvc::*;
+
fn main() {
- _ = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once();
- mount_to_body(TodoMVC)
+ leptos::mount::mount_to_body(TodoMVC)
}