diff --git a/.github/workflows/ci-changed-examples.yml b/.github/workflows/ci-changed-examples.yml
index fbf9f59ba4..3c14b2fa43 100644
--- a/.github/workflows/ci-changed-examples.yml
+++ b/.github/workflows/ci-changed-examples.yml
@@ -29,4 +29,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
- toolchain: nightly-2024-01-29
+ toolchain: nightly-2024-03-31
diff --git a/.github/workflows/ci-examples.yml b/.github/workflows/ci-examples.yml
index bced8a5cd4..ed0d936206 100644
--- a/.github/workflows/ci-examples.yml
+++ b/.github/workflows/ci-examples.yml
@@ -24,4 +24,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
- toolchain: nightly-2024-01-29
+ toolchain: nightly-2024-03-31
diff --git a/.github/workflows/ci-semver.yml b/.github/workflows/ci-semver.yml
index 2a066edd64..f5d7567024 100644
--- a/.github/workflows/ci-semver.yml
+++ b/.github/workflows/ci-semver.yml
@@ -15,7 +15,7 @@ jobs:
test:
needs: [get-leptos-changed]
if: needs.get-leptos-changed.outputs.leptos_changed == 'true'
- name: Run semver check (nightly-2024-01-29)
+ name: Run semver check (nightly-2024-03-31)
runs-on: ubuntu-latest
steps:
@@ -25,4 +25,4 @@ jobs:
- name: Semver Checks
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
- rust-toolchain: nightly-2024-01-29
+ rust-toolchain: nightly-2024-03-31
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8c23f30761..00434b8d0b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -40,4 +40,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
- toolchain: nightly-2024-01-29
+ toolchain: nightly-2024-03-31
diff --git a/.github/workflows/get-leptos-changed.yml b/.github/workflows/get-leptos-changed.yml
index 36483bc096..d41a0bcfc6 100644
--- a/.github/workflows/get-leptos-changed.yml
+++ b/.github/workflows/get-leptos-changed.yml
@@ -16,6 +16,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
- name: Get source files that changed
id: changed-source
diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml
index b7a073fb86..6b40161967 100644
--- a/.github/workflows/run-cargo-make-task.yml
+++ b/.github/workflows/run-cargo-make-task.yml
@@ -48,6 +48,9 @@ jobs:
- name: Install wasm-bindgen
run: cargo binstall wasm-bindgen-cli --no-confirm
+ - name: Install wasm-pack
+ run: cargo binstall wasm-pack --no-confirm
+
- name: Install cargo-leptos
run: cargo binstall cargo-leptos --no-confirm
diff --git a/Cargo.toml b/Cargo.toml
index 849881a834..00a577c711 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,23 +25,23 @@ members = [
exclude = ["benchmarks", "examples"]
[workspace.package]
-version = "0.6.9"
+version = "0.6.10"
rust-version = "1.75"
[workspace.dependencies]
-leptos = { path = "./leptos", version = "0.6.9" }
-leptos_dom = { path = "./leptos_dom", version = "0.6.9" }
-leptos_hot_reload = { path = "./leptos_hot_reload", version = "0.6.9" }
-leptos_macro = { path = "./leptos_macro", version = "0.6.9" }
-leptos_reactive = { path = "./leptos_reactive", version = "0.6.9" }
-leptos_server = { path = "./leptos_server", version = "0.6.9" }
-server_fn = { path = "./server_fn", version = "0.6.9" }
-server_fn_macro = { path = "./server_fn_macro", version = "0.6.9" }
+leptos = { path = "./leptos", version = "0.6.10" }
+leptos_dom = { path = "./leptos_dom", version = "0.6.10" }
+leptos_hot_reload = { path = "./leptos_hot_reload", version = "0.6.10" }
+leptos_macro = { path = "./leptos_macro", version = "0.6.10" }
+leptos_reactive = { path = "./leptos_reactive", version = "0.6.10" }
+leptos_server = { path = "./leptos_server", version = "0.6.10" }
+server_fn = { path = "./server_fn", version = "0.6.10" }
+server_fn_macro = { path = "./server_fn_macro", version = "0.6.10" }
server_fn_macro_default = { path = "./server_fn/server_fn_macro_default", version = "0.6" }
-leptos_config = { path = "./leptos_config", version = "0.6.9" }
-leptos_router = { path = "./router", version = "0.6.9" }
-leptos_meta = { path = "./meta", version = "0.6.9" }
-leptos_integration_utils = { path = "./integrations/utils", version = "0.6.9" }
+leptos_config = { path = "./leptos_config", version = "0.6.10" }
+leptos_router = { path = "./router", version = "0.6.10" }
+leptos_meta = { path = "./meta", version = "0.6.10" }
+leptos_integration_utils = { path = "./integrations/utils", version = "0.6.10" }
[profile.release]
codegen-units = 1
diff --git a/cargo-make/check.toml b/cargo-make/check.toml
index da8951cb26..6ce13a8229 100644
--- a/cargo-make/check.toml
+++ b/cargo-make/check.toml
@@ -3,5 +3,5 @@ alias = "check-all"
[tasks.check-all]
command = "cargo"
-args = ["+nightly-2024-01-29", "check-all-features"]
+args = ["+nightly-2024-03-31", "check-all-features"]
install_crate = "cargo-all-features"
diff --git a/cargo-make/lint.toml b/cargo-make/lint.toml
index a996462fb7..36154091ca 100644
--- a/cargo-make/lint.toml
+++ b/cargo-make/lint.toml
@@ -9,12 +9,10 @@ args = ["fmt", "--", "--check", "--config-path", "${LEPTOS_PROJECT_DIRECTORY}"]
dependencies = ["install-clippy"]
command = "cargo"
args = [
- "hack",
"clippy",
- "--all",
- "--each-feature",
- "--no-dev-deps",
+ "--all-features",
+ "--no-deps",
"--",
"-D",
- "clippy::print_stdout"
+ "clippy::print_stdout",
]
diff --git a/cargo-make/test.toml b/cargo-make/test.toml
index b0903e1e5b..356fb2f0ab 100644
--- a/cargo-make/test.toml
+++ b/cargo-make/test.toml
@@ -3,5 +3,5 @@ alias = "test-all"
[tasks.test-all]
command = "cargo"
-args = ["+nightly-2024-01-29", "test-all-features"]
+args = ["+nightly-2024-03-31", "test-all-features"]
install_crate = "cargo-all-features"
diff --git a/examples/animated_show/Cargo.toml b/examples/animated_show/Cargo.toml
index 4df8cfa0b8..c4850bd292 100644
--- a/examples/animated_show/Cargo.toml
+++ b/examples/animated_show/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2021"
codegen-units = 1
lto = true
-[dependencies]
+[dependencies]
leptos = { path = "../../leptos", features = ["csr"] }
console_log = "1"
log = "0.4"
diff --git a/examples/cargo-make/cargo-leptos.toml b/examples/cargo-make/cargo-leptos.toml
index 825add57db..37602188ad 100644
--- a/examples/cargo-make/cargo-leptos.toml
+++ b/examples/cargo-make/cargo-leptos.toml
@@ -15,13 +15,13 @@ clear = true
dependencies = ["check-debug", "check-release"]
[tasks.check-debug]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
[tasks.check-release]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features", "--release"]
install_crate = "cargo-all-features"
diff --git a/examples/cargo-make/compile.toml b/examples/cargo-make/compile.toml
index 88d650aea7..14724d90e1 100644
--- a/examples/cargo-make/compile.toml
+++ b/examples/cargo-make/compile.toml
@@ -1,11 +1,11 @@
[tasks.build]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["build-all-features"]
install_crate = "cargo-all-features"
[tasks.check]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
diff --git a/examples/cargo-make/deno-build.toml b/examples/cargo-make/deno-build.toml
index 30b5f4da26..3b74b619d1 100644
--- a/examples/cargo-make/deno-build.toml
+++ b/examples/cargo-make/deno-build.toml
@@ -12,13 +12,13 @@ clear = true
dependencies = ["check-debug", "check-release"]
[tasks.check-debug]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
[tasks.check-release]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features", "--release"]
install_crate = "cargo-all-features"
diff --git a/examples/counter/Cargo.toml b/examples/counter/Cargo.toml
index 9ae44fe19b..46f237b64f 100644
--- a/examples/counter/Cargo.toml
+++ b/examples/counter/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
console_log = "1"
log = "0.4"
console_error_panic_hook = "0.1.7"
diff --git a/examples/counter/rust-toolchain.toml b/examples/counter/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/counter/rust-toolchain.toml
+++ b/examples/counter/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/counter/src/lib.rs b/examples/counter/src/lib.rs
index a55a630693..66b0e90dcd 100644
--- a/examples/counter/src/lib.rs
+++ b/examples/counter/src/lib.rs
@@ -14,9 +14,9 @@ pub fn SimpleCounter(
view! {
- "Clear"
+ "Clear"
"-1"
- "Value: " {value} "!"
+ "Value: " {move || value.get()} "!"
"+1"
}
diff --git a/examples/counter_isomorphic/Cargo.toml b/examples/counter_isomorphic/Cargo.toml
index 370987d779..fccc8a4904 100644
--- a/examples/counter_isomorphic/Cargo.toml
+++ b/examples/counter_isomorphic/Cargo.toml
@@ -31,7 +31,6 @@ simple_logger = "4.3"
tracing = { version = "0.1", optional = true }
[features]
-default = ["nightly"]
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"]
ssr = [
"dep:actix-files",
@@ -45,7 +44,7 @@ ssr = [
nightly = ["leptos/nightly", "leptos_router/nightly"]
[package.metadata.cargo-all-features]
-denylist = ["actix-files", "actix-web", "leptos_actix", "nightly"]
+denylist = ["actix-files", "actix-web", "leptos_actix"]
skip_feature_sets = [["ssr", "hydrate"]]
[package.metadata.leptos]
diff --git a/examples/counter_url_query/Cargo.toml b/examples/counter_url_query/Cargo.toml
index 743c848aa5..8bfa95fb56 100644
--- a/examples/counter_url_query/Cargo.toml
+++ b/examples/counter_url_query/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
leptos_router = { path = "../../router", features = ["csr"] }
console_log = "1"
log = "0.4"
diff --git a/examples/counter_url_query/rust-toolchain.toml b/examples/counter_url_query/rust-toolchain.toml
index 055e912d2e..292fe499e3 100644
--- a/examples/counter_url_query/rust-toolchain.toml
+++ b/examples/counter_url_query/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "stable"
diff --git a/examples/counter_url_query/src/lib.rs b/examples/counter_url_query/src/lib.rs
index 39165f3df2..f4f4ff3b05 100644
--- a/examples/counter_url_query/src/lib.rs
+++ b/examples/counter_url_query/src/lib.rs
@@ -7,17 +7,17 @@ use leptos_router::*;
#[component]
pub fn SimpleQueryCounter() -> impl IntoView {
let (count, set_count) = create_query_signal::("count");
- let clear = move |_| set_count(None);
- let decrement = move |_| set_count(Some(count().unwrap_or(0) - 1));
- let increment = move |_| set_count(Some(count().unwrap_or(0) + 1));
+ let clear = move |_| set_count.set(None);
+ let decrement = move |_| set_count.set(Some(count.get().unwrap_or(0) - 1));
+ let increment = move |_| set_count.set(Some(count.get().unwrap_or(0) + 1));
let (msg, set_msg) = create_query_signal::("message");
let update_msg = move |ev| {
let new_msg = event_target_value(&ev);
if new_msg.is_empty() {
- set_msg(None);
+ set_msg.set(None);
} else {
- set_msg(Some(new_msg));
+ set_msg.set(Some(new_msg));
}
};
@@ -25,13 +25,13 @@ pub fn SimpleQueryCounter() -> impl IntoView {
"Clear"
"-1"
- "Value: " {move || count().unwrap_or(0)} "!"
+ "Value: " {move || count.get().unwrap_or(0)} "!"
"+1"
diff --git a/examples/counter_without_macros/src/lib.rs b/examples/counter_without_macros/src/lib.rs
index ca67982a7f..6124517f8c 100644
--- a/examples/counter_without_macros/src/lib.rs
+++ b/examples/counter_without_macros/src/lib.rs
@@ -1,4 +1,4 @@
-use leptos::{ev, html::*, *};
+use leptos::{html::*, *};
/// A simple counter view.
// A component is really just a function call: it runs once to create the DOM and reactive system
diff --git a/examples/counters/Cargo.toml b/examples/counters/Cargo.toml
index a788c6ddbb..d59b430352 100644
--- a/examples/counters/Cargo.toml
+++ b/examples/counters/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
log = "0.4"
console_log = "1"
console_error_panic_hook = "0.1.7"
diff --git a/examples/counters/rust-toolchain.toml b/examples/counters/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/counters/rust-toolchain.toml
+++ b/examples/counters/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/counters/src/lib.rs b/examples/counters/src/lib.rs
index b154be3b69..3df34397c7 100644
--- a/examples/counters/src/lib.rs
+++ b/examples/counters/src/lib.rs
@@ -1,4 +1,4 @@
-use leptos::{For, *};
+use leptos::*;
const MANY_COUNTERS: usize = 1000;
@@ -16,14 +16,14 @@ pub fn Counters() -> impl IntoView {
provide_context(CounterUpdater { set_counters });
let add_counter = move |_| {
- let id = next_counter_id();
+ let id = next_counter_id.get();
let sig = create_signal(0);
set_counters.update(move |counters| counters.push((id, sig)));
set_next_counter_id.update(|id| *id += 1);
};
let add_many_counters = move |_| {
- let next_id = next_counter_id();
+ let next_id = next_counter_id.get();
let new_counters = (next_id..next_id + MANY_COUNTERS).map(|id| {
let signal = create_signal(0);
(id, signal)
@@ -53,17 +53,17 @@ pub fn Counters() -> impl IntoView {
{move ||
counters.get()
.iter()
- .map(|(_, (count, _))| count())
+ .map(|(_, (count, _))| count.get())
.sum::()
.to_string()
}
" from "
- {move || counters().len().to_string()}
+ {move || counters.get().len().to_string()}
" counters."
, WriteSignal))| {
view! {
@@ -85,7 +85,8 @@ fn Counter(
let CounterUpdater { set_counters } = use_context().unwrap();
let input = move |ev| {
- set_value(event_target_value(&ev).parse::().unwrap_or_default())
+ set_value
+ .set(event_target_value(&ev).parse::().unwrap_or_default())
};
// this will run when the scope is disposed, i.e., when this row is deleted
diff --git a/examples/counters_stable/.gitignore b/examples/counters_stable/.gitignore
deleted file mode 100644
index b77e2dda3c..0000000000
--- a/examples/counters_stable/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-# Generated by Cargo
-# will have compiled files and executables
-/target/
-
-# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
-# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
-Cargo.lock
-
-# These are backup files generated by rustfmt
-**/*.rs.bk
-
-# Support playwright testing
-node_modules/
-test-results/
-end2end/playwright-report/
-playwright/.cache/
-pnpm-lock.yaml
-
-# Support trunk
-dist
diff --git a/examples/counters_stable/Cargo.toml b/examples/counters_stable/Cargo.toml
deleted file mode 100644
index 27d518e16c..0000000000
--- a/examples/counters_stable/Cargo.toml
+++ /dev/null
@@ -1,28 +0,0 @@
-[package]
-name = "counters_stable"
-version = "0.1.0"
-edition = "2021"
-rust-version = "1.75"
-
-[dependencies]
-leptos = { path = "../../leptos", features = ["csr"] }
-leptos_meta = { path = "../../meta", features = ["csr"] }
-log = "0.4"
-console_log = "1"
-console_error_panic_hook = "0.1.7"
-
-[dev-dependencies]
-wasm-bindgen = "0.2"
-wasm-bindgen-test = "0.3.37"
-pretty_assertions = "1.4.0"
-
-[dev-dependencies.web-sys]
-features = [
- "Event",
- "EventInit",
- "EventTarget",
- "HtmlElement",
- "HtmlInputElement",
- "XPathResult",
-]
-version = "0.3.64"
diff --git a/examples/counters_stable/Makefile.toml b/examples/counters_stable/Makefile.toml
deleted file mode 100644
index b55782e1d4..0000000000
--- a/examples/counters_stable/Makefile.toml
+++ /dev/null
@@ -1,18 +0,0 @@
-extend = [
- { path = "../cargo-make/main.toml" },
- { path = "../cargo-make/wasm-test.toml" },
- { path = "../cargo-make/trunk_server.toml" },
- { path = "../cargo-make/playwright-test.toml" },
-]
-
-[tasks.build]
-toolchain = "stable"
-command = "cargo"
-args = ["build-all-features"]
-install_crate = "cargo-all-features"
-
-[tasks.check]
-toolchain = "stable"
-command = "cargo"
-args = ["check-all-features"]
-install_crate = "cargo-all-features"
diff --git a/examples/counters_stable/README.md b/examples/counters_stable/README.md
deleted file mode 100644
index f009121d87..0000000000
--- a/examples/counters_stable/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Leptos Counters Example on Rust Stable
-
-This example showcases a basic Leptos app with many counters. It is a good example of how to setup a basic reactive app with signals and effects, and how to interact with browser events. Unlike the other counters example, it will compile on Rust stable, because it has the `stable` feature enabled.
-
-## Getting Started
-
-See the [Examples README](../README.md) for setup and run instructions.
-
-## Quick Start
-
-Run `trunk serve --open` to run this example.
diff --git a/examples/counters_stable/e2e/.gitignore b/examples/counters_stable/e2e/.gitignore
deleted file mode 100644
index 75e854d8dc..0000000000
--- a/examples/counters_stable/e2e/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-node_modules/
-/test-results/
-/playwright-report/
-/playwright/.cache/
diff --git a/examples/counters_stable/e2e/package-lock.json b/examples/counters_stable/e2e/package-lock.json
deleted file mode 100644
index c67e400e02..0000000000
--- a/examples/counters_stable/e2e/package-lock.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "name": "grip",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "grip",
- "devDependencies": {
- "@playwright/test": "^1.35.1"
- }
- },
- "node_modules/.pnpm/@playwright+test@1.33.0": {
- "extraneous": true
- },
- "node_modules/.pnpm/@types+node@20.2.1/node_modules/@types/node": {
- "version": "20.2.1",
- "extraneous": true,
- "license": "MIT"
- },
- "node_modules/.pnpm/playwright-core@1.33.0/node_modules/playwright-core": {
- "version": "1.33.0",
- "extraneous": true,
- "license": "Apache-2.0",
- "bin": {
- "playwright": "cli.js"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/@playwright/test": {
- "version": "1.35.1",
- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.35.1.tgz",
- "integrity": "sha512-b5YoFe6J9exsMYg0pQAobNDR85T1nLumUYgUTtKm4d21iX2L7WqKq9dW8NGJ+2vX0etZd+Y7UeuqsxDXm9+5ZA==",
- "dev": true,
- "dependencies": {
- "@types/node": "*",
- "playwright-core": "1.35.1"
- },
- "bin": {
- "playwright": "cli.js"
- },
- "engines": {
- "node": ">=16"
- },
- "optionalDependencies": {
- "fsevents": "2.3.2"
- }
- },
- "node_modules/@types/node": {
- "version": "20.3.1",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
- "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==",
- "dev": true
- },
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/playwright-core": {
- "version": "1.35.1",
- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.35.1.tgz",
- "integrity": "sha512-pNXb6CQ7OqmGDRspEjlxE49w+4YtR6a3X6mT1hZXeJHWmsEz7SunmvZeiG/+y1yyMZdHnnn73WKYdtV1er0Xyg==",
- "dev": true,
- "bin": {
- "playwright-core": "cli.js"
- },
- "engines": {
- "node": ">=16"
- }
- }
- }
-}
diff --git a/examples/counters_stable/e2e/package.json b/examples/counters_stable/e2e/package.json
deleted file mode 100644
index f7038d2bc4..0000000000
--- a/examples/counters_stable/e2e/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "private": "true",
- "scripts": {},
- "devDependencies": {
- "@playwright/test": "^1.35.1"
- }
-}
diff --git a/examples/counters_stable/e2e/playwright.config.ts b/examples/counters_stable/e2e/playwright.config.ts
deleted file mode 100644
index 93b328ee00..0000000000
--- a/examples/counters_stable/e2e/playwright.config.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import { defineConfig, devices } from "@playwright/test";
-
-/**
- * Read environment variables from file.
- * https://github.com/motdotla/dotenv
- */
-// require('dotenv').config();
-
-/**
- * See https://playwright.dev/docs/test-configuration.
- */
-export default defineConfig({
- testDir: "./tests",
- /* Run tests in files in parallel */
- fullyParallel: true,
- /* Fail the build on CI if you accidentally left test.only in the source code. */
- forbidOnly: !process.env.DEV,
- /* Retry on CI only */
- retries: process.env.DEV ? 0 : 10,
- /* Opt out of parallel tests on CI. */
- workers: process.env.DEV ? 1 : 1,
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
- reporter: [["html", { open: "never" }], ["list"]],
- /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
- use: {
- /* Base URL to use in actions like `await page.goto('/')`. */
- baseURL: "http://127.0.0.1:8080",
-
- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
- trace: "on-first-retry",
- },
-
- /* Configure projects for major browsers */
- projects: [
- {
- name: "chromium",
- use: { ...devices["Desktop Chrome"] },
- },
-
- // {
- // name: "firefox",
- // use: { ...devices["Desktop Firefox"] },
- // },
-
- // {
- // name: "webkit",
- // use: { ...devices["Desktop Safari"] },
- // },
-
- /* Test against mobile viewports. */
- // {
- // name: 'Mobile Chrome',
- // use: { ...devices['Pixel 5'] },
- // },
- // {
- // name: 'Mobile Safari',
- // use: { ...devices['iPhone 12'] },
- // },
-
- /* Test against branded browsers. */
- // {
- // name: 'Microsoft Edge',
- // use: { ...devices['Desktop Edge'], channel: 'msedge' },
- // },
- // {
- // name: 'Google Chrome',
- // use: { ..devices['Desktop Chrome'], channel: 'chrome' },
- // },
- ],
-
- /* Run your local dev server before starting the tests */
- // webServer: {
- // command: "cd ../ && trunk serve",
- // url: "http://127.0.0.1:8080",
- // reuseExistingServer: false, //!process.env.CI,
- // },
-});
diff --git a/examples/counters_stable/e2e/tests/add_1k_counters.spec.ts b/examples/counters_stable/e2e/tests/add_1k_counters.spec.ts
deleted file mode 100644
index ee65dc8aaf..0000000000
--- a/examples/counters_stable/e2e/tests/add_1k_counters.spec.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Add 1000 Counters", () => {
- test("should increase the number of counters", async ({ page }) => {
- const ui = new CountersPage(page);
-
- await Promise.all([
- await ui.goto(),
- await ui.addOneThousandCountersButton.waitFor(),
- ]);
-
- await ui.addOneThousandCounters();
- await ui.addOneThousandCounters();
- await ui.addOneThousandCounters();
-
- await expect(ui.counters).toHaveText("3000");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/add_counter.spec.ts b/examples/counters_stable/e2e/tests/add_counter.spec.ts
deleted file mode 100644
index ed24360ff7..0000000000
--- a/examples/counters_stable/e2e/tests/add_counter.spec.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Add Counter", () => {
- test("should increase the number of counters", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
-
- await ui.addCounter();
- await ui.addCounter();
- await ui.addCounter();
-
- await expect(ui.counters).toHaveText("3");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/clear_counters.spec.ts b/examples/counters_stable/e2e/tests/clear_counters.spec.ts
deleted file mode 100644
index 29cdfe9aa7..0000000000
--- a/examples/counters_stable/e2e/tests/clear_counters.spec.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Clear Counters", () => {
- test("should reset the counts", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
-
- await ui.addCounter();
- await ui.addCounter();
- await ui.addCounter();
-
- await ui.clearCounters();
-
- await expect(ui.total).toHaveText("0");
- await expect(ui.counters).toHaveText("0");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/decrement_count.spec.ts b/examples/counters_stable/e2e/tests/decrement_count.spec.ts
deleted file mode 100644
index 9b4834e3e2..0000000000
--- a/examples/counters_stable/e2e/tests/decrement_count.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Decrement Count", () => {
- test("should decrease the total count", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
- await ui.addCounter();
-
- await ui.decrementCount();
- await ui.decrementCount();
- await ui.decrementCount();
-
- await expect(ui.total).toHaveText("-3");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/enter_count.spec.ts b/examples/counters_stable/e2e/tests/enter_count.spec.ts
deleted file mode 100644
index 98e6250783..0000000000
--- a/examples/counters_stable/e2e/tests/enter_count.spec.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Enter Count", () => {
- test("should increase the total count", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
- await ui.addCounter();
-
- await ui.enterCount("5");
-
- await expect(ui.total).toHaveText("5");
- await expect(ui.counters).toHaveText("1");
- });
-
- test("should decrease the total count", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
- await ui.addCounter();
- await ui.addCounter();
- await ui.addCounter();
-
- await ui.enterCount("100");
- await ui.enterCount("100", 1);
- await ui.enterCount("100", 2);
- await ui.enterCount("50", 1);
-
- await expect(ui.total).toHaveText("250");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/fixtures/counters_page.ts b/examples/counters_stable/e2e/tests/fixtures/counters_page.ts
deleted file mode 100644
index 7b951de659..0000000000
--- a/examples/counters_stable/e2e/tests/fixtures/counters_page.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import { expect, Locator, Page } from "@playwright/test";
-
-export class CountersPage {
- readonly page: Page;
- readonly addCounterButton: Locator;
- readonly addOneThousandCountersButton: Locator;
- readonly clearCountersButton: Locator;
-
- readonly incrementCountButton: Locator;
- readonly counterInput: Locator;
- readonly decrementCountButton: Locator;
- readonly removeCountButton: Locator;
-
- readonly total: Locator;
- readonly counters: Locator;
-
- constructor(page: Page) {
- this.page = page;
-
- this.addCounterButton = page.locator("button", { hasText: "Add Counter" });
-
- this.addOneThousandCountersButton = page.locator("button", {
- hasText: "Add 1000 Counters",
- });
-
- this.clearCountersButton = page.locator("button", {
- hasText: "Clear Counters",
- });
-
- this.decrementCountButton = page.locator("button", {
- hasText: "-1",
- });
-
- this.incrementCountButton = page.locator("button", {
- hasText: "+1",
- });
-
- this.removeCountButton = page.locator("button", {
- hasText: "x",
- });
-
- this.total = page.getByTestId("total");
-
- this.counters = page.getByTestId("counters");
-
- this.counterInput = page.getByRole("textbox");
- }
-
- async goto() {
- await this.page.goto("/");
- }
-
- async addCounter() {
- await Promise.all([
- this.addCounterButton.waitFor(),
- this.addCounterButton.click(),
- ]);
- }
-
- async addOneThousandCounters() {
- this.addOneThousandCountersButton.click();
- }
-
- async decrementCount(index: number = 0) {
- await Promise.all([
- this.decrementCountButton.nth(index).waitFor(),
- this.decrementCountButton.nth(index).click(),
- ]);
- }
-
- async incrementCount(index: number = 0) {
- await Promise.all([
- this.incrementCountButton.nth(index).waitFor(),
- this.incrementCountButton.nth(index).click(),
- ]);
- }
-
- async clearCounters() {
- await Promise.all([
- this.clearCountersButton.waitFor(),
- this.clearCountersButton.click(),
- ]);
- }
-
- async enterCount(count: string, index: number = 0) {
- await Promise.all([
- this.counterInput.nth(index).waitFor(),
- this.counterInput.nth(index).fill(count),
- ]);
- }
-
- async removeCounter(index: number = 0) {
- await Promise.all([
- this.removeCountButton.nth(index).waitFor(),
- this.removeCountButton.nth(index).click(),
- ]);
- }
-}
diff --git a/examples/counters_stable/e2e/tests/increment_count.spec.ts b/examples/counters_stable/e2e/tests/increment_count.spec.ts
deleted file mode 100644
index 15b490454d..0000000000
--- a/examples/counters_stable/e2e/tests/increment_count.spec.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Increment Count", () => {
- test("should increase the total count", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
- await ui.addCounter();
-
- await ui.incrementCount();
- await ui.incrementCount();
- await ui.incrementCount();
-
- await expect(ui.total).toHaveText("3");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/remove_counter.spec.ts b/examples/counters_stable/e2e/tests/remove_counter.spec.ts
deleted file mode 100644
index 7abffb088d..0000000000
--- a/examples/counters_stable/e2e/tests/remove_counter.spec.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("Remove Counter", () => {
- test("should decrement the number of counters", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
-
- await ui.addCounter();
- await ui.addCounter();
- await ui.addCounter();
-
- await ui.removeCounter(1);
-
- await expect(ui.counters).toHaveText("2");
- });
-});
diff --git a/examples/counters_stable/e2e/tests/view_counters.spec.ts b/examples/counters_stable/e2e/tests/view_counters.spec.ts
deleted file mode 100644
index de2fcaae08..0000000000
--- a/examples/counters_stable/e2e/tests/view_counters.spec.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { test, expect } from "@playwright/test";
-import { CountersPage } from "./fixtures/counters_page";
-
-test.describe("View Counters", () => {
- test("should see the title", async ({ page }) => {
- const ui = new CountersPage(page);
- await ui.goto();
-
- await expect(page).toHaveTitle("Counters (Stable)");
- });
-
- test("should see the initial counts", async ({ page }) => {
- const counters = new CountersPage(page);
- await counters.goto();
-
- await expect(counters.total).toHaveText("0");
- await expect(counters.counters).toHaveText("0");
- });
-});
diff --git a/examples/counters_stable/index.html b/examples/counters_stable/index.html
deleted file mode 100644
index 6984e9492c..0000000000
--- a/examples/counters_stable/index.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/examples/counters_stable/package.json b/examples/counters_stable/package.json
deleted file mode 100644
index 86d5d8868c..0000000000
--- a/examples/counters_stable/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "private": "true",
- "scripts": {
- "start-server": "trunk serve",
- "e2e": "cargo make test-playwright",
- "e2e:auto-start": "start-server-and-test start-server http://127.0.0.1:8080 e2e"
- },
- "devDependencies": {
- "start-server-and-test": "^1.15.4"
- }
-}
diff --git a/examples/counters_stable/src/lib.rs b/examples/counters_stable/src/lib.rs
deleted file mode 100644
index 35e31bdd4c..0000000000
--- a/examples/counters_stable/src/lib.rs
+++ /dev/null
@@ -1,118 +0,0 @@
-use leptos::*;
-use leptos_meta::*;
-
-const MANY_COUNTERS: usize = 1000;
-
-type CounterHolder = Vec<(usize, (ReadSignal, WriteSignal))>;
-
-#[derive(Copy, Clone)]
-struct CounterUpdater {
- set_counters: WriteSignal,
-}
-
-#[component]
-pub fn Counters() -> impl IntoView {
- let (next_counter_id, set_next_counter_id) = create_signal(0);
- let (counters, set_counters) = create_signal::(vec![]);
- provide_context(CounterUpdater { set_counters });
-
- let add_counter = move |_| {
- let id = next_counter_id.get();
- let sig = create_signal(0);
- set_counters.update(move |counters| counters.push((id, sig)));
- set_next_counter_id.update(|id| *id += 1);
- };
-
- let add_many_counters = move |_| {
- let next_id = next_counter_id.get();
- let new_counters = (next_id..next_id + MANY_COUNTERS).map(|id| {
- let signal = create_signal(0);
- (id, signal)
- });
-
- set_counters.update(move |counters| counters.extend(new_counters));
- set_next_counter_id.update(|id| *id += MANY_COUNTERS);
- };
-
- let clear_counters = move |_| {
- set_counters.update(|counters| counters.clear());
- };
-
- view! {
-
-
-
- "Add Counter"
-
-
- {format!("Add {MANY_COUNTERS} Counters")}
-
-
- "Clear Counters"
-
-
- "Total: "
- {move ||
- counters.get()
- .iter()
- .map(|(_, (count, _))| count.get())
- .sum::()
- .to_string()
- }
- " from "
- {move || counters.with(|counters| counters.len()).to_string()}
- " counters."
-
-
-
- }
-}
-
-#[component]
-fn Counter(
- id: usize,
- value: ReadSignal,
- set_value: WriteSignal,
-) -> impl IntoView {
- let CounterUpdater { set_counters } = use_context().unwrap();
-
- let input = move |ev| {
- set_value
- .set(event_target_value(&ev).parse::().unwrap_or_default())
- };
-
- // this will run when the scope is disposed, i.e., when this row is deleted
- // because the signal was created in the parent scope, it won't be disposed
- // of until the parent scope is. but we no longer need it, so we'll dispose of
- // it when this row is deleted, instead. if we don't dispose of it here,
- // this memory will "leak," i.e., the signal will continue to exist until the
- // parent component is removed. in the case of this component, where it's the
- // root, that's the lifetime of the program.
- on_cleanup(move || {
- log::debug!("deleted a row");
- value.dispose();
- });
-
- view! {
-
- "-1"
-
- {value}
- "+1"
- "x"
-
- }
-}
diff --git a/examples/counters_stable/src/main.rs b/examples/counters_stable/src/main.rs
deleted file mode 100644
index eef05dbc3a..0000000000
--- a/examples/counters_stable/src/main.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-use counters_stable::Counters;
-use leptos::*;
-
-fn main() {
- _ = console_log::init_with_level(log::Level::Debug);
- console_error_panic_hook::set_once();
- mount_to_body(|| view! { })
-}
diff --git a/examples/counters_stable/tests/web/add_1k_counters.rs b/examples/counters_stable/tests/web/add_1k_counters.rs
deleted file mode 100644
index 85aa01a8b4..0000000000
--- a/examples/counters_stable/tests/web/add_1k_counters.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_increase_the_number_of_counters() {
- // Given
- ui::view_counters();
-
- // When
- ui::add_1k_counters();
- ui::add_1k_counters();
- ui::add_1k_counters();
-
- // Then
- assert_eq!(ui::counters(), 3000);
-}
diff --git a/examples/counters_stable/tests/web/add_counter.rs b/examples/counters_stable/tests/web/add_counter.rs
deleted file mode 100644
index b01270f30e..0000000000
--- a/examples/counters_stable/tests/web/add_counter.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_increase_the_number_of_counters() {
- // Given
- ui::view_counters();
-
- // When
- ui::add_counter();
- ui::add_counter();
- ui::add_counter();
-
- // Then
- assert_eq!(ui::counters(), 3);
-}
diff --git a/examples/counters_stable/tests/web/clear_counters.rs b/examples/counters_stable/tests/web/clear_counters.rs
deleted file mode 100644
index a9b9e797c4..0000000000
--- a/examples/counters_stable/tests/web/clear_counters.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_reset_the_counts() {
- // Given
- ui::view_counters();
- ui::add_counter();
- ui::add_counter();
- ui::add_counter();
-
- // When
- ui::clear_counters();
-
- // Then
- assert_eq!(ui::total(), 0);
- assert_eq!(ui::counters(), 0);
-}
diff --git a/examples/counters_stable/tests/web/decrement_counter.rs b/examples/counters_stable/tests/web/decrement_counter.rs
deleted file mode 100644
index 5538ce0646..0000000000
--- a/examples/counters_stable/tests/web/decrement_counter.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_decrease_the_total_count() {
- // Given
- ui::view_counters();
- ui::add_counter();
-
- // When
- ui::decrement_counter(1);
- ui::decrement_counter(1);
- ui::decrement_counter(1);
-
- // Then
- assert_eq!(ui::total(), -3);
-}
diff --git a/examples/counters_stable/tests/web/enter_count.rs b/examples/counters_stable/tests/web/enter_count.rs
deleted file mode 100644
index 9e344985ff..0000000000
--- a/examples/counters_stable/tests/web/enter_count.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_increase_the_total_count() {
- // Given
- ui::view_counters();
- ui::add_counter();
-
- // When
- ui::enter_count(1, 5);
-
- // Then
- assert_eq!(ui::total(), 5);
-}
-
-#[wasm_bindgen_test]
-fn should_decrease_the_total_count() {
- // Given
- ui::view_counters();
- ui::add_counter();
- ui::add_counter();
- ui::add_counter();
-
- // When
- ui::enter_count(1, 100);
- ui::enter_count(2, 100);
- ui::enter_count(3, 100);
- ui::enter_count(1, 50);
-
- // Then
- assert_eq!(ui::total(), 250);
-}
diff --git a/examples/counters_stable/tests/web/fixtures/counters_page.rs b/examples/counters_stable/tests/web/fixtures/counters_page.rs
deleted file mode 100644
index 7015c5a867..0000000000
--- a/examples/counters_stable/tests/web/fixtures/counters_page.rs
+++ /dev/null
@@ -1,112 +0,0 @@
-use counters_stable::Counters;
-use leptos::*;
-use wasm_bindgen::JsCast;
-use web_sys::{Element, Event, EventInit, HtmlElement, HtmlInputElement};
-
-// Actions
-
-pub fn add_1k_counters() {
- find_by_text("Add 1000 Counters").click();
-}
-
-pub fn add_counter() {
- find_by_text("Add Counter").click();
-}
-
-pub fn clear_counters() {
- find_by_text("Clear Counters").click();
-}
-
-pub fn decrement_counter(index: u32) {
- counter_html_element(index, "decrement_count").click();
-}
-
-pub fn enter_count(index: u32, count: i32) {
- let input = counter_input_element(index, "counter_input");
- input.set_value(count.to_string().as_str());
- let mut event_init = EventInit::new();
- event_init.bubbles(true);
- let event = Event::new_with_event_init_dict("input", &event_init).unwrap();
- input.dispatch_event(&event).unwrap();
-}
-
-pub fn increment_counter(index: u32) {
- counter_html_element(index, "increment_count").click();
-}
-
-pub fn remove_counter(index: u32) {
- counter_html_element(index, "remove_counter").click();
-}
-
-pub fn view_counters() {
- remove_existing_counters();
- mount_to_body(|| view! { });
-}
-
-// Results
-
-pub fn counters() -> i32 {
- data_test_id("counters").parse::().unwrap()
-}
-
-pub fn title() -> String {
- leptos::document().title()
-}
-
-pub fn total() -> i32 {
- data_test_id("total").parse::().unwrap()
-}
-
-// Internal
-
-fn counter_element(index: u32, text: &str) -> Element {
- let selector =
- format!("li:nth-child({}) [data-testid=\"{}\"]", index, text);
- leptos::document()
- .query_selector(&selector)
- .unwrap()
- .unwrap()
-}
-
-fn counter_html_element(index: u32, text: &str) -> HtmlElement {
- counter_element(index, text)
- .dyn_into::()
- .unwrap()
-}
-
-fn counter_input_element(index: u32, text: &str) -> HtmlInputElement {
- counter_element(index, text)
- .dyn_into::()
- .unwrap()
-}
-
-fn data_test_id(id: &str) -> String {
- let selector = format!("[data-testid=\"{}\"]", id);
- leptos::document()
- .query_selector(&selector)
- .unwrap()
- .expect("counters not found")
- .text_content()
- .unwrap()
-}
-
-fn find_by_text(text: &str) -> HtmlElement {
- let xpath = format!("//*[text()='{}']", text);
- let document = leptos::document();
- document
- .evaluate(&xpath, &document)
- .unwrap()
- .iterate_next()
- .unwrap()
- .unwrap()
- .dyn_into::()
- .unwrap()
-}
-
-fn remove_existing_counters() {
- if let Some(counter) =
- leptos::document().query_selector("body div").unwrap()
- {
- counter.remove();
- }
-}
diff --git a/examples/counters_stable/tests/web/fixtures/mod.rs b/examples/counters_stable/tests/web/fixtures/mod.rs
deleted file mode 100644
index 835ba570a6..0000000000
--- a/examples/counters_stable/tests/web/fixtures/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod counters_page;
diff --git a/examples/counters_stable/tests/web/increment_counter.rs b/examples/counters_stable/tests/web/increment_counter.rs
deleted file mode 100644
index 43b04bd611..0000000000
--- a/examples/counters_stable/tests/web/increment_counter.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_increase_the_total_count() {
- // Given
- ui::view_counters();
- ui::add_counter();
-
- // When
- ui::increment_counter(1);
- ui::increment_counter(1);
- ui::increment_counter(1);
-
- // Then
- assert_eq!(ui::total(), 3);
-}
diff --git a/examples/counters_stable/tests/web/main.rs b/examples/counters_stable/tests/web/main.rs
deleted file mode 100644
index 8abdfe58a5..0000000000
--- a/examples/counters_stable/tests/web/main.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-use wasm_bindgen_test::*;
-
-// Test Suites
-pub mod add_1k_counters;
-pub mod add_counter;
-pub mod clear_counters;
-pub mod decrement_counter;
-pub mod enter_count;
-pub mod increment_counter;
-pub mod remove_counter;
-pub mod view_counters;
-
-pub mod fixtures;
-pub use fixtures::*;
-
-wasm_bindgen_test_configure!(run_in_browser);
diff --git a/examples/counters_stable/tests/web/remove_counter.rs b/examples/counters_stable/tests/web/remove_counter.rs
deleted file mode 100644
index d43852fac8..0000000000
--- a/examples/counters_stable/tests/web/remove_counter.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_decrement_the_number_of_counters() {
- // Given
- ui::view_counters();
- ui::add_counter();
- ui::add_counter();
- ui::add_counter();
-
- // When
- ui::remove_counter(2);
-
- // Then
- assert_eq!(ui::counters(), 2);
-}
diff --git a/examples/counters_stable/tests/web/view_counters.rs b/examples/counters_stable/tests/web/view_counters.rs
deleted file mode 100644
index eefb78c360..0000000000
--- a/examples/counters_stable/tests/web/view_counters.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-use super::*;
-use crate::counters_page as ui;
-use pretty_assertions::assert_eq;
-
-#[wasm_bindgen_test]
-fn should_see_the_initial_counts() {
- // When
- ui::view_counters();
-
- // Then
- assert_eq!(ui::total(), 0);
- assert_eq!(ui::counters(), 0);
-}
-
-#[wasm_bindgen_test]
-fn should_see_the_title() {
- // When
- ui::view_counters();
-
- // Then
- assert_eq!(ui::title(), "Counters (Stable)");
-}
diff --git a/examples/directives/Cargo.toml b/examples/directives/Cargo.toml
index 8be0418ef8..31a4975692 100644
--- a/examples/directives/Cargo.toml
+++ b/examples/directives/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
log = "0.4"
console_log = "1"
console_error_panic_hook = "0.1.7"
diff --git a/examples/directives/rust-toolchain.toml b/examples/directives/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/directives/rust-toolchain.toml
+++ b/examples/directives/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/error_boundary/Cargo.toml b/examples/error_boundary/Cargo.toml
index 97aa7f6b73..0bcca6c417 100644
--- a/examples/error_boundary/Cargo.toml
+++ b/examples/error_boundary/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
console_log = "1"
log = "0.4"
console_error_panic_hook = "0.1.7"
diff --git a/examples/error_boundary/rust-toolchain.toml b/examples/error_boundary/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/error_boundary/rust-toolchain.toml
+++ b/examples/error_boundary/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/error_boundary/src/lib.rs b/examples/error_boundary/src/lib.rs
index 9dea35c450..d8f6d41a5a 100644
--- a/examples/error_boundary/src/lib.rs
+++ b/examples/error_boundary/src/lib.rs
@@ -5,7 +5,8 @@ pub fn App() -> impl IntoView {
let (value, set_value) = create_signal(Ok(0));
// when input changes, try to parse a number from the input
- let on_input = move |ev| set_value(event_target_value(&ev).parse::());
+ let on_input =
+ move |ev| set_value.set(event_target_value(&ev).parse::());
view! {
"Error Handling"
diff --git a/examples/errors_axum/Cargo.toml b/examples/errors_axum/Cargo.toml
index 8a7693ba66..41892f4051 100644
--- a/examples/errors_axum/Cargo.toml
+++ b/examples/errors_axum/Cargo.toml
@@ -9,7 +9,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
console_log = "1.0"
console_error_panic_hook = "0.1"
-leptos = { path = "../../leptos", features = ["nightly"] }
+leptos = { path = "../../leptos" }
leptos_axum = { path = "../../integrations/axum", optional = true }
leptos_meta = { path = "../../meta" }
leptos_router = { path = "../../router" }
diff --git a/examples/errors_axum/rust-toolchain.toml b/examples/errors_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/errors_axum/rust-toolchain.toml
+++ b/examples/errors_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/errors_axum/src/error_template.rs b/examples/errors_axum/src/error_template.rs
index ca4239328a..9854cea6f2 100644
--- a/examples/errors_axum/src/error_template.rs
+++ b/examples/errors_axum/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::AppError;
-use leptos::{logging::log, Errors, *};
+use leptos::{logging::log, *};
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/fetch/Cargo.toml b/examples/fetch/Cargo.toml
index 3a098ce638..00e8e65c25 100644
--- a/examples/fetch/Cargo.toml
+++ b/examples/fetch/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
reqwasm = "0.5"
serde = { version = "1", features = ["derive"] }
log = "0.4"
diff --git a/examples/fetch/rust-toolchain.toml b/examples/fetch/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/fetch/rust-toolchain.toml
+++ b/examples/fetch/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/fetch/src/lib.rs b/examples/fetch/src/lib.rs
index c523104356..87008319ed 100644
--- a/examples/fetch/src/lib.rs
+++ b/examples/fetch/src/lib.rs
@@ -44,7 +44,7 @@ pub fn fetch_example() -> impl IntoView {
// 1) our error type isn't serializable/deserializable
// 2) we're not doing server-side rendering in this example anyway
// (during SSR, create_resource will begin loading on the server and resolve on the client)
- let cats = create_local_resource(cat_count, fetch_cats);
+ let cats = create_local_resource(move || cat_count.get(), fetch_cats);
let fallback = move |errors: RwSignal| {
let error_list = move || {
@@ -85,7 +85,7 @@ pub fn fetch_example() -> impl IntoView {
prop:value=move || cat_count.get().to_string()
on:input=move |ev| {
let val = event_target_value(&ev).parse::().unwrap_or(0);
- set_cat_count(val);
+ set_cat_count.set(val);
}
/>
diff --git a/examples/gtk/Cargo.toml b/examples/gtk/Cargo.toml
index 7577eb5d2d..0a78c445ed 100644
--- a/examples/gtk/Cargo.toml
+++ b/examples/gtk/Cargo.toml
@@ -4,5 +4,5 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
gtk = { version = "0.5.0", package = "gtk4" }
diff --git a/examples/gtk/src/main.rs b/examples/gtk/src/main.rs
index 5ed5b5aada..c5ed28f7ae 100644
--- a/examples/gtk/src/main.rs
+++ b/examples/gtk/src/main.rs
@@ -51,7 +51,7 @@ fn counter_button() -> Button {
create_effect({
let button = button.clone();
move |_| {
- button.set_label(&format!("Count: {}", value()));
+ button.set_label(&format!("Count: {}", value.get()));
}
});
diff --git a/examples/hackernews/rust-toolchain.toml b/examples/hackernews/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/hackernews/rust-toolchain.toml
+++ b/examples/hackernews/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/hackernews/src/routes/story.rs b/examples/hackernews/src/routes/story.rs
index c63dafc043..596d47bb73 100644
--- a/examples/hackernews/src/routes/story.rs
+++ b/examples/hackernews/src/routes/story.rs
@@ -7,7 +7,7 @@ use leptos_router::*;
pub fn Story() -> impl IntoView {
let params = use_params_map();
let story = create_resource(
- move || params().get("id").cloned().unwrap_or_default(),
+ move || params.get().get("id").cloned().unwrap_or_default(),
move |id| async move {
if id.is_empty() {
None
diff --git a/examples/hackernews/src/routes/users.rs b/examples/hackernews/src/routes/users.rs
index 0f65113fa9..d311575329 100644
--- a/examples/hackernews/src/routes/users.rs
+++ b/examples/hackernews/src/routes/users.rs
@@ -6,7 +6,7 @@ use leptos_router::*;
pub fn User() -> impl IntoView {
let params = use_params_map();
let user = create_resource(
- move || params().get("id").cloned().unwrap_or_default(),
+ move || params.get().get("id").cloned().unwrap_or_default(),
move |id| async move {
if id.is_empty() {
None
diff --git a/examples/hackernews_axum/Cargo.toml b/examples/hackernews_axum/Cargo.toml
index 440d43fe13..c5b12e3ef3 100644
--- a/examples/hackernews_axum/Cargo.toml
+++ b/examples/hackernews_axum/Cargo.toml
@@ -13,10 +13,10 @@ lto = true
[dependencies]
console_log = "1.0"
console_error_panic_hook = "0.1"
-leptos = { path = "../../leptos", features = ["nightly"] }
+leptos = { path = "../../leptos" }
leptos_axum = { path = "../../integrations/axum", optional = true }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_meta = { path = "../../meta" }
+leptos_router = { path = "../../router" }
log = "0.4"
simple_logger = "4.0"
serde = { version = "1.0", features = ["derive"] }
diff --git a/examples/hackernews_axum/rust-toolchain.toml b/examples/hackernews_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/hackernews_axum/rust-toolchain.toml
+++ b/examples/hackernews_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/hackernews_axum/src/error_template.rs b/examples/hackernews_axum/src/error_template.rs
index 58a8af2ef3..6f1244d44b 100644
--- a/examples/hackernews_axum/src/error_template.rs
+++ b/examples/hackernews_axum/src/error_template.rs
@@ -1,4 +1,4 @@
-use leptos::{view, Errors, For, IntoView, RwSignal, View};
+use leptos::{view, Errors, For, IntoView, RwSignal, SignalGet, View};
// A basic function to display errors served by the error boundaries. Feel free to do more complicated things
// here than just displaying them
@@ -11,7 +11,7 @@ pub fn error_template(errors: Option>) -> View {
"Errors"
impl IntoView {
let hide_more_link = move || {
stories.get().unwrap_or(None).unwrap_or_default().len() < 28
- || pending()
+ || pending.get()
};
view! {
diff --git a/examples/hackernews_axum/src/routes/story.rs b/examples/hackernews_axum/src/routes/story.rs
index 00449a03a1..b20385bb64 100644
--- a/examples/hackernews_axum/src/routes/story.rs
+++ b/examples/hackernews_axum/src/routes/story.rs
@@ -7,7 +7,7 @@ use leptos_router::*;
pub fn Story() -> impl IntoView {
let params = use_params_map();
let story = create_resource(
- move || params().get("id").cloned().unwrap_or_default(),
+ move || params.get().get("id").cloned().unwrap_or_default(),
move |id| async move {
if id.is_empty() {
None
@@ -80,14 +80,14 @@ pub fn Comment(comment: api::Comment) -> impl IntoView {
{format!(" {}", comment.time_ago)}
- {(!comment.comments.is_empty()).then(|| {
+ {(!comment.comments.is_empty()).then(move || {
view! {
-
+
- {move || open().then({
+ {move || open.get().then({
let comments = comment.comments.clone();
move || view! {
"Errors"
impl IntoView { let params = use_params_map(); let user = create_resource( - move || params().get("id").cloned().unwrap_or_default(), + move || params.get().get("id").cloned().unwrap_or_default(), move |id| async move { if id.is_empty() { Ok(None) diff --git a/examples/hackernews_js_fetch/Cargo.toml b/examples/hackernews_js_fetch/Cargo.toml index 00a934bdf9..6a8decc3df 100644 --- a/examples/hackernews_js_fetch/Cargo.toml +++ b/examples/hackernews_js_fetch/Cargo.toml @@ -14,10 +14,10 @@ lto = true console_log = "1.0.0" console_error_panic_hook = "0.1.7" cfg-if = "1.0.0" -leptos = { version = "0.5", features = ["nightly"] } +leptos = { version = "0.5" } leptos_axum = { version = "0.5", default-features = false, optional = true } -leptos_meta = { version = "0.5", features = ["nightly"] } -leptos_router = { version = "0.5", features = ["nightly"] } +leptos_meta = { version = "0.5" } +leptos_router = { version = "0.5" } log = "0.4.17" simple_logger = "4.0.0" serde = { version = "1.0.148", features = ["derive"] } diff --git a/examples/hackernews_js_fetch/src/error_template.rs b/examples/hackernews_js_fetch/src/error_template.rs index adad9489cf..c9300452fa 100644 --- a/examples/hackernews_js_fetch/src/error_template.rs +++ b/examples/hackernews_js_fetch/src/error_template.rs @@ -1,4 +1,4 @@ -use leptos::{view, Errors, For, IntoView, RwSignal, View}; +use leptos::{view, Errors, For, IntoView, RwSignal, SignalGet, View}; // A basic function to display errors served by the error boundaries. Feel free to do more complicated things // here than just displaying them @@ -11,7 +11,7 @@ pub fn error_template(errors: Option>) -> View {
impl IntoView {
let hide_more_link = move || {
stories.get().unwrap_or(None).unwrap_or_default().len() < 28
- || pending()
+ || pending.get()
};
view! {
diff --git a/examples/hackernews_js_fetch/src/routes/story.rs b/examples/hackernews_js_fetch/src/routes/story.rs
index 00449a03a1..176027e040 100644
--- a/examples/hackernews_js_fetch/src/routes/story.rs
+++ b/examples/hackernews_js_fetch/src/routes/story.rs
@@ -7,7 +7,7 @@ use leptos_router::*;
pub fn Story() -> impl IntoView {
let params = use_params_map();
let story = create_resource(
- move || params().get("id").cloned().unwrap_or_default(),
+ move || params.get().get("id").cloned().unwrap_or_default(),
move |id| async move {
if id.is_empty() {
None
@@ -83,11 +83,11 @@ pub fn Comment(comment: api::Comment) -> impl IntoView {
{(!comment.comments.is_empty()).then(|| {
view! {
-
+
{
let comments_len = comment.comments.len();
- move || if open() {
+ move || if open.get() {
"[-]".into()
} else {
format!("[+] {}{} collapsed", comments_len, pluralize(comments_len))
@@ -95,7 +95,7 @@ pub fn Comment(comment: api::Comment) -> impl IntoView {
}
- {move || open().then({
+ {move || open.get().then({
let comments = comment.comments.clone();
move || view! {
"Errors"
diff --git a/examples/hackernews_js_fetch/src/routes/users.rs b/examples/hackernews_js_fetch/src/routes/users.rs index 74264adf74..79257db16b 100644 --- a/examples/hackernews_js_fetch/src/routes/users.rs +++ b/examples/hackernews_js_fetch/src/routes/users.rs @@ -6,7 +6,7 @@ use leptos_router::*; pub fn User() -> impl IntoView { let params = use_params_map(); let user = create_resource( - move || params().get("id").cloned().unwrap_or_default(), + move || params.get().get("id").cloned().unwrap_or_default(), move |id| async move { if id.is_empty() { None diff --git a/examples/js-framework-benchmark/Cargo.toml b/examples/js-framework-benchmark/Cargo.toml index ba0e2ce058..d64028a6f2 100644 --- a/examples/js-framework-benchmark/Cargo.toml +++ b/examples/js-framework-benchmark/Cargo.toml @@ -8,7 +8,7 @@ codegen-units = 1 lto = true [dependencies] -leptos = { path = "../../leptos", features = ["csr", "nightly", "template_macro"] } +leptos = { path = "../../leptos", features = ["csr","template_macro"] } console_log = "1" log = "0.4" # used in rand, but we need to enable js feature diff --git a/examples/js-framework-benchmark/Makefile.toml b/examples/js-framework-benchmark/Makefile.toml index 44916eed44..6953f1b0bb 100644 --- a/examples/js-framework-benchmark/Makefile.toml +++ b/examples/js-framework-benchmark/Makefile.toml @@ -5,13 +5,13 @@ extend = [ ] [tasks.build] -toolchain = "nightly-2024-01-29" +toolchain = "nightly-2024-03-31" command = "cargo" args = ["build-all-features", "--target", "wasm32-unknown-unknown"] install_crate = "cargo-all-features" [tasks.check] -toolchain = "nightly-2024-01-29" +toolchain = "nightly-2024-03-31" command = "cargo" args = ["check-all-features", "--target", "wasm32-unknown-unknown"] install_crate = "cargo-all-features" diff --git a/examples/js-framework-benchmark/rust-toolchain.toml b/examples/js-framework-benchmark/rust-toolchain.toml index 055e912d2e..99fa95aaaf 100644 --- a/examples/js-framework-benchmark/rust-toolchain.toml +++ b/examples/js-framework-benchmark/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-01-29" +channel = "nightly-2024-03-31" diff --git a/examples/js-framework-benchmark/src/lib.rs b/examples/js-framework-benchmark/src/lib.rs index cabc062f46..2543820839 100644 --- a/examples/js-framework-benchmark/src/lib.rs +++ b/examples/js-framework-benchmark/src/lib.rs @@ -109,13 +109,13 @@ pub fn App() -> impl IntoView { }; let run = move |_| { - set_data(build_data(1000)); - set_selected(None); + set_data.set(build_data(1000)); + set_selected.set(None); }; let run_lots = move |_| { - set_data(build_data(10000)); - set_selected(None); + set_data.set(build_data(10000)); + set_selected.set(None); }; let add = move |_| { @@ -131,8 +131,8 @@ pub fn App() -> impl IntoView { }; let clear = move |_| { - set_data(Vec::new()); - set_selected(None); + set_data.set(Vec::new()); + set_selected.set(None); }; let swap_rows = move |_| { @@ -143,7 +143,7 @@ pub fn App() -> impl IntoView { }); }; - let is_selected = create_selector(selected); + let is_selected = create_selector(move || selected.get()); view! { @@ -166,7 +166,7 @@ pub fn App() -> impl IntoView {
impl IntoView {
template! {
{row_id.to_string()}
- {move || label.get()}
+ {move || label.get()}
diff --git a/examples/login_with_token_csr_only/Cargo.toml b/examples/login_with_token_csr_only/Cargo.toml
index 88a18d2e00..1a961fbc65 100644
--- a/examples/login_with_token_csr_only/Cargo.toml
+++ b/examples/login_with_token_csr_only/Cargo.toml
@@ -7,6 +7,6 @@ codegen-units = 1
lto = true
[patch.crates-io]
-leptos = { path = "../../leptos", features = ["nightly"] }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos = { path = "../../leptos" }
+leptos_router = { path = "../../router" }
api-boundary = { path = "api-boundary" }
diff --git a/examples/login_with_token_csr_only/client/src/components/credentials.rs b/examples/login_with_token_csr_only/client/src/components/credentials.rs
index fcb3a81f7e..c4ffcd8f74 100644
--- a/examples/login_with_token_csr_only/client/src/components/credentials.rs
+++ b/examples/login_with_token_csr_only/client/src/components/credentials.rs
@@ -1,4 +1,4 @@
-use leptos::{ev, *};
+use leptos::*;
#[component]
pub fn CredentialsForm(
diff --git a/examples/login_with_token_csr_only/server/src/application.rs b/examples/login_with_token_csr_only/server/src/application.rs
index a410be951f..722586da21 100644
--- a/examples/login_with_token_csr_only/server/src/application.rs
+++ b/examples/login_with_token_csr_only/server/src/application.rs
@@ -16,7 +16,7 @@ impl AppState {
credentials: Credentials,
) -> Result<(), CreateUserError> {
let Credentials { email, password } = credentials;
- let user_exists = self.users.get(&email).is_some();
+ let user_exists = self.users.contains_key(&email);
if user_exists {
return Err(CreateUserError::UserExists);
}
@@ -124,6 +124,7 @@ impl EmailAddress {
#[derive(Clone)]
pub struct CurrentUser {
pub email: EmailAddress,
+ #[allow(dead_code)] // possibly a lint regression, this is used at line 65
pub token: Uuid,
}
diff --git a/examples/parent_child/Cargo.toml b/examples/parent_child/Cargo.toml
index eee81b8ec1..09caca8c25 100644
--- a/examples/parent_child/Cargo.toml
+++ b/examples/parent_child/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
console_log = "1"
log = "0.4"
console_error_panic_hook = "0.1.7"
diff --git a/examples/parent_child/rust-toolchain.toml b/examples/parent_child/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/parent_child/rust-toolchain.toml
+++ b/examples/parent_child/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/parent_child/src/lib.rs b/examples/parent_child/src/lib.rs
index c67f9add4e..3d3fba0ab6 100644
--- a/examples/parent_child/src/lib.rs
+++ b/examples/parent_child/src/lib.rs
@@ -31,10 +31,10 @@ pub fn App() -> impl IntoView {
-
- {
pub fn RkyvExample() -> impl IntoView {
let input_ref = NodeRef::::new();
let (input, set_input) = create_signal(String::new());
- let rkyv_result = create_resource(input, rkyv_example);
+ let rkyv_result = create_resource(move || input.get(), rkyv_example);
view! {
Click to capitalize
-
- {rkyv_result}
+ {move || rkyv_result.get()}
}
}
@@ -507,9 +509,9 @@ pub fn FileUploadWithProgress() -> impl IntoView {
.unchecked_into::();
let filename = file.name();
let size = file.size() as usize;
- set_filename(Some(filename.clone()));
- set_max(Some(size));
- set_current(None::);
+ set_filename.set(Some(filename.clone()));
+ set_max.set(Some(size));
+ set_current.set(None::);
spawn_local(async move {
let mut progress = file_progress(filename)
@@ -532,7 +534,7 @@ pub fn FileUploadWithProgress() -> impl IntoView {
)
.parse::()
.expect("invalid length");
- set_current(Some(len));
+ set_current.set(Some(len));
}
});
spawn_local(async move {
@@ -550,9 +552,9 @@ pub fn FileUploadWithProgress() -> impl IntoView {
- {move || filename().map(|filename| view! { ,
) -> impl IntoView {
move || {
- if cond() {
+ if cond.get() {
(then.children)().into_view()
- } else if let Some(else_if) = else_if.iter().find(|i| (i.cond)()) {
+ } else if let Some(else_if) = else_if.iter().find(|i| i.cond.get()) {
(else_if.children)().into_view()
} else if let Some(fallback) = &fallback {
(fallback.children)().into_view()
@@ -43,13 +43,13 @@ fn SlotIf(
#[component]
pub fn App() -> impl IntoView {
let (count, set_count) = create_signal(0);
- let is_even = MaybeSignal::derive(move || count() % 2 == 0);
- let is_div5 = MaybeSignal::derive(move || count() % 5 == 0);
- let is_div7 = MaybeSignal::derive(move || count() % 7 == 0);
+ let is_even = MaybeSignal::derive(move || count.get() % 2 == 0);
+ let is_div5 = MaybeSignal::derive(move || count.get() % 5 == 0);
+ let is_div7 = MaybeSignal::derive(move || count.get() % 7 == 0);
view! {
"+1"
- " "{count}" is "
+ " "{move||count.get()}" is "
// The slot name can be emitted if it would match the slot struct name (in snake case).
"even"
diff --git a/examples/sso_auth_axum/src/main.rs b/examples/sso_auth_axum/src/main.rs
index 9a017d44b2..87cdcb9fb3 100644
--- a/examples/sso_auth_axum/src/main.rs
+++ b/examples/sso_auth_axum/src/main.rs
@@ -8,12 +8,12 @@ use axum::{
Router,
};
use axum_session::{Key, SessionConfig, SessionLayer, SessionStore};
-use axum_session_auth::{AuthConfig, AuthSessionLayer, SessionSqlitePool};
+use axum_session_auth::{AuthConfig, AuthSessionLayer};
use leptos::{get_configuration, logging::log, provide_context, view};
use leptos_axum::{
generate_route_list, handle_server_fns_with_context, LeptosRoutes,
};
-use sqlx::{sqlite::SqlitePoolOptions, SqlitePool};
+use sqlx::sqlite::SqlitePoolOptions;
use sso_auth_axum::{
auth::*, fallback::file_and_error_handler, state::AppState,
};
diff --git a/examples/ssr_modes/Cargo.toml b/examples/ssr_modes/Cargo.toml
index da2d7cecf5..8117cd0c30 100644
--- a/examples/ssr_modes/Cargo.toml
+++ b/examples/ssr_modes/Cargo.toml
@@ -12,10 +12,10 @@ actix-web = { version = "4", optional = true, features = ["macros"] }
console_error_panic_hook = "0.1"
console_log = "1"
lazy_static = "1"
-leptos = { path = "../../leptos", features = ["nightly"] }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
+leptos = { path = "../../leptos"}
+leptos_meta = { path = "../../meta" }
leptos_actix = { path = "../../integrations/actix", optional = true }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_router = { path = "../../router" }
log = "0.4"
serde = { version = "1", features = ["derive"] }
thiserror = "1"
diff --git a/examples/ssr_modes/rust-toolchain.toml b/examples/ssr_modes/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/ssr_modes/rust-toolchain.toml
+++ b/examples/ssr_modes/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/ssr_modes/src/app.rs b/examples/ssr_modes/src/app.rs
index 9da69a2158..e69357a9f7 100644
--- a/examples/ssr_modes/src/app.rs
+++ b/examples/ssr_modes/src/app.rs
@@ -67,7 +67,7 @@ fn HomePage() -> impl IntoView {
#[derive(Params, Copy, Clone, Debug, PartialEq, Eq)]
pub struct PostParams {
- id: usize,
+ id: Option,
}
#[component]
@@ -75,7 +75,9 @@ fn Post() -> impl IntoView {
let query = use_params::();
let id = move || {
query.with(|q| {
- q.as_ref().map(|q| q.id).map_err(|_| PostError::InvalidId)
+ q.as_ref()
+ .map(|q| q.id.unwrap_or_default())
+ .map_err(|_| PostError::InvalidId)
})
};
let post = create_resource(id, |id| async move {
diff --git a/examples/ssr_modes_axum/Cargo.toml b/examples/ssr_modes_axum/Cargo.toml
index e69cc16ead..2751bf30d5 100644
--- a/examples/ssr_modes_axum/Cargo.toml
+++ b/examples/ssr_modes_axum/Cargo.toml
@@ -10,10 +10,10 @@ crate-type = ["cdylib", "rlib"]
console_error_panic_hook = "0.1"
console_log = "1"
lazy_static = "1"
-leptos = { path = "../../leptos", features = ["nightly"] }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
+leptos = { path = "../../leptos"}
+leptos_meta = { path = "../../meta" }
leptos_axum = { path = "../../integrations/axum", optional = true }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_router = { path = "../../router" }
log = "0.4"
serde = { version = "1", features = ["derive"] }
thiserror = "1"
diff --git a/examples/ssr_modes_axum/rust-toolchain.toml b/examples/ssr_modes_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/ssr_modes_axum/rust-toolchain.toml
+++ b/examples/ssr_modes_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/ssr_modes_axum/src/app.rs b/examples/ssr_modes_axum/src/app.rs
index 6b24570f2b..1b042d64ff 100644
--- a/examples/ssr_modes_axum/src/app.rs
+++ b/examples/ssr_modes_axum/src/app.rs
@@ -67,7 +67,7 @@ fn HomePage() -> impl IntoView {
#[derive(Params, Copy, Clone, Debug, PartialEq, Eq)]
pub struct PostParams {
- id: usize,
+ id: Option,
}
#[component]
@@ -75,7 +75,9 @@ fn Post() -> impl IntoView {
let query = use_params::();
let id = move || {
query.with(|q| {
- q.as_ref().map(|q| q.id).map_err(|_| PostError::InvalidId)
+ q.as_ref()
+ .map(|q| q.id.unwrap_or_default())
+ .map_err(|_| PostError::InvalidId)
})
};
let post = create_resource(id, |id| async move {
diff --git a/examples/tailwind_actix/Cargo.toml b/examples/tailwind_actix/Cargo.toml
index 57cd5d7e87..74839c3301 100644
--- a/examples/tailwind_actix/Cargo.toml
+++ b/examples/tailwind_actix/Cargo.toml
@@ -9,10 +9,10 @@ crate-type = ["cdylib", "rlib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-leptos = { path = "../../leptos", features = ["nightly"] }
+leptos = { path = "../../leptos" }
leptos_actix = { path = "../../integrations/actix", optional = true }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_meta = { path = "../../meta" }
+leptos_router = { path = "../../router" }
gloo-net = { version = "0.2", features = ["http"] }
log = "0.4"
diff --git a/examples/tailwind_actix/rust-toolchain.toml b/examples/tailwind_actix/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/tailwind_actix/rust-toolchain.toml
+++ b/examples/tailwind_actix/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/tailwind_actix/src/app.rs b/examples/tailwind_actix/src/app.rs
index 7310885be7..8eee7dedf8 100644
--- a/examples/tailwind_actix/src/app.rs
+++ b/examples/tailwind_actix/src/app.rs
@@ -31,10 +31,10 @@ fn Home() -> impl IntoView {
on:click=move |_| set_count.update(|count| *count += 1)
>
"Something's here | "
- {move || if count() == 0 {
+ {move || if count.get() == 0 {
"Click me!".to_string()
} else {
- count().to_string()
+ count.get().to_string()
}}
" | Some more text"
diff --git a/examples/tailwind_axum/Cargo.toml b/examples/tailwind_axum/Cargo.toml
index cae42b0c57..7db56c8cdd 100644
--- a/examples/tailwind_axum/Cargo.toml
+++ b/examples/tailwind_axum/Cargo.toml
@@ -10,10 +10,10 @@ crate-type = ["cdylib", "rlib"]
axum = { version = "0.7", optional = true }
console_error_panic_hook = "0.1"
console_log = "1"
-leptos = { path = "../../leptos", features = ["nightly"] }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
+leptos = { path = "../../leptos" }
+leptos_meta = { path = "../../meta" }
leptos_axum = { path = "../../integrations/axum", optional = true }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_router = { path = "../../router" }
log = "0.4.17"
simple_logger = "4"
tokio = { version = "1", features = ["rt-multi-thread", "macros"], optional = true }
diff --git a/examples/tailwind_axum/rust-toolchain.toml b/examples/tailwind_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/tailwind_axum/rust-toolchain.toml
+++ b/examples/tailwind_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/tailwind_axum/src/app.rs b/examples/tailwind_axum/src/app.rs
index 932096e007..81a3e1b72d 100644
--- a/examples/tailwind_axum/src/app.rs
+++ b/examples/tailwind_axum/src/app.rs
@@ -31,7 +31,7 @@ fn Home() -> impl IntoView {
"+"
- {value}
+ {move||value.get()}
"-"
diff --git a/examples/tailwind_csr/Cargo.toml b/examples/tailwind_csr/Cargo.toml
index 4a22d2aed2..f20122e97b 100644
--- a/examples/tailwind_csr/Cargo.toml
+++ b/examples/tailwind_csr/Cargo.toml
@@ -4,9 +4,9 @@ version = "0.1.0"
edition = "2021"
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
-leptos_meta = { path = "../../meta", features = ["csr", "nightly"] }
-leptos_router = { path = "../../router", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
+leptos_meta = { path = "../../meta", features = ["csr"] }
+leptos_router = { path = "../../router", features = ["csr"] }
log = "0.4"
gloo-net = { version = "0.2", features = ["http"] }
diff --git a/examples/tailwind_csr/rust-toolchain.toml b/examples/tailwind_csr/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/tailwind_csr/rust-toolchain.toml
+++ b/examples/tailwind_csr/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/tailwind_csr/src/app.rs b/examples/tailwind_csr/src/app.rs
index c375cde878..274896ba13 100644
--- a/examples/tailwind_csr/src/app.rs
+++ b/examples/tailwind_csr/src/app.rs
@@ -31,10 +31,10 @@ fn Home() -> impl IntoView {
on:click=move |_| set_count.update(|count| *count += 1)
>
"Something's here | "
- {move || if count() == 0 {
+ {move || if count.get() == 0 {
"Click me!".to_string()
} else {
- count().to_string()
+ count.get().to_string()
}}
" | Some more text"
diff --git a/examples/timer/Cargo.toml b/examples/timer/Cargo.toml
index 63686821d6..77033bc265 100644
--- a/examples/timer/Cargo.toml
+++ b/examples/timer/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["csr", "nightly"] }
+leptos = { path = "../../leptos", features = ["csr"] }
console_log = "1"
log = "0.4"
console_error_panic_hook = "0.1.7"
diff --git a/examples/timer/rust-toolchain.toml b/examples/timer/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/timer/rust-toolchain.toml
+++ b/examples/timer/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/timer/src/lib.rs b/examples/timer/src/lib.rs
index 3a2cba9903..b0acfe11f1 100644
--- a/examples/timer/src/lib.rs
+++ b/examples/timer/src/lib.rs
@@ -21,12 +21,12 @@ pub fn TimerDemo() -> impl IntoView {
view! {
"Count A (fixed interval of 1000 ms)"
- {count_a}
- "Count B (dynamic interval, currently " {interval} " ms)"
- {count_b}
+ {move||count_a.get()}
+ "Count B (dynamic interval, currently " {move||interval.get()} " ms)"
+ {move||count_b.get()}
() {
- set_interval(value);
+ set_interval.set(value);
}
}/>
diff --git a/examples/todo_app_sqlite/Cargo.toml b/examples/todo_app_sqlite/Cargo.toml
index 5e0727fb69..df031fd352 100644
--- a/examples/todo_app_sqlite/Cargo.toml
+++ b/examples/todo_app_sqlite/Cargo.toml
@@ -15,10 +15,10 @@ console_log = "1.0.0"
console_error_panic_hook = "0.1.7"
serde = { version = "1.0.152", features = ["derive"] }
futures = "0.3.25"
-leptos = { path = "../../leptos", features = ["nightly"] }
+leptos = { path = "../../leptos"}
leptos_actix = { path = "../../integrations/actix", optional = true }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_meta = { path = "../../meta" }
+leptos_router = { path = "../../router" }
log = "0.4.17"
simple_logger = "4.0.0"
gloo = { git = "https://github.com/rustwasm/gloo" }
diff --git a/examples/todo_app_sqlite/rust-toolchain.toml b/examples/todo_app_sqlite/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/todo_app_sqlite/rust-toolchain.toml
+++ b/examples/todo_app_sqlite/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/todo_app_sqlite_axum/Cargo.toml b/examples/todo_app_sqlite_axum/Cargo.toml
index 2e9194a173..a0c4143e62 100644
--- a/examples/todo_app_sqlite_axum/Cargo.toml
+++ b/examples/todo_app_sqlite_axum/Cargo.toml
@@ -11,11 +11,11 @@ console_log = "1.0"
console_error_panic_hook = "0.1"
futures = "0.3"
http = "1.0"
-leptos = { path = "../../leptos", features = ["nightly"] }
+leptos = { path = "../../leptos" }
server_fn = { path = "../../server_fn", features = ["serde-lite"] }
leptos_axum = { path = "../../integrations/axum", optional = true }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_meta = { path = "../../meta" }
+leptos_router = { path = "../../router" }
log = "0.4"
simple_logger = "4.0"
serde = { version = "1", features = ["derive"] }
diff --git a/examples/todo_app_sqlite_axum/rust-toolchain.toml b/examples/todo_app_sqlite_axum/rust-toolchain.toml
index 055e912d2e..292fe499e3 100644
--- a/examples/todo_app_sqlite_axum/rust-toolchain.toml
+++ b/examples/todo_app_sqlite_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "stable"
diff --git a/examples/todo_app_sqlite_axum/src/error_template.rs b/examples/todo_app_sqlite_axum/src/error_template.rs
index 0a1731abe1..d68b2b58f7 100644
--- a/examples/todo_app_sqlite_axum/src/error_template.rs
+++ b/examples/todo_app_sqlite_axum/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
-use leptos::{Errors, *};
+use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/todo_app_sqlite_csr/Cargo.toml b/examples/todo_app_sqlite_csr/Cargo.toml
index f8b2dc3fe0..5607229b2d 100644
--- a/examples/todo_app_sqlite_csr/Cargo.toml
+++ b/examples/todo_app_sqlite_csr/Cargo.toml
@@ -10,10 +10,10 @@ crate-type = ["cdylib", "rlib"]
console_log = "1.0"
console_error_panic_hook = "0.1"
futures = "0.3"
-leptos = { path = "../../leptos", features = ["nightly"] }
+leptos = { path = "../../leptos" }
leptos_axum = { path = "../../integrations/axum", optional = true }
-leptos_meta = { path = "../../meta", features = ["nightly"] }
-leptos_router = { path = "../../router", features = ["nightly"] }
+leptos_meta = { path = "../../meta"}
+leptos_router = { path = "../../router" }
leptos_integration_utils = { path = "../../integrations/utils", optional = true }
log = "0.4"
simple_logger = "4.0"
diff --git a/examples/todo_app_sqlite_csr/rust-toolchain.toml b/examples/todo_app_sqlite_csr/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/todo_app_sqlite_csr/rust-toolchain.toml
+++ b/examples/todo_app_sqlite_csr/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/todo_app_sqlite_csr/src/error_template.rs b/examples/todo_app_sqlite_csr/src/error_template.rs
index d7f6b52619..e4e64a82f6 100644
--- a/examples/todo_app_sqlite_csr/src/error_template.rs
+++ b/examples/todo_app_sqlite_csr/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
-use leptos::{Errors, *};
+use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/todomvc/Cargo.toml b/examples/todomvc/Cargo.toml
index e5f5915621..8d301f6ae2 100644
--- a/examples/todomvc/Cargo.toml
+++ b/examples/todomvc/Cargo.toml
@@ -8,7 +8,7 @@ codegen-units = 1
lto = true
[dependencies]
-leptos = { path = "../../leptos", features = ["nightly", "serde"] }
+leptos = { path = "../../leptos", features = ["serde"] }
log = "0.4"
console_log = "1"
console_error_panic_hook = "0.1.7"
diff --git a/examples/todomvc/rust-toolchain.toml b/examples/todomvc/rust-toolchain.toml
index 055e912d2e..292fe499e3 100644
--- a/examples/todomvc/rust-toolchain.toml
+++ b/examples/todomvc/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "stable"
diff --git a/examples/todomvc/src/lib.rs b/examples/todomvc/src/lib.rs
index 2c37fad92d..112c4eb1d6 100644
--- a/examples/todomvc/src/lib.rs
+++ b/examples/todomvc/src/lib.rs
@@ -146,7 +146,7 @@ pub fn TodoMVC() -> impl IntoView {
window_event_listener(ev::hashchange, move |_| {
let new_mode =
location_hash().map(|hash| route(&hash)).unwrap_or_default();
- set_mode(new_mode);
+ set_mode.set(new_mode);
});
// Callback to add a todo on pressing the `Enter` key, if the field isn't empty
@@ -256,9 +256,9 @@ pub fn TodoMVC() -> impl IntoView {
" left"
impl IntoView {
} else {
todo.title.set(value.to_string());
}
- set_editing(false);
+ set_editing.set(false);
};
view! {
@@ -307,14 +307,14 @@ pub fn Todo(todo: Todo) -> impl IntoView {
node_ref=todo_input
class="toggle"
type="checkbox"
- prop:checked={move || (todo.completed)()}
+ prop:checked={move || todo.completed.get()}
on:input={move |ev| {
let checked = event_target_checked(&ev);
todo.completed.set(checked);
}}
/>
- {move || editing().then(|| view! {
+ {move || editing.get().then(|| view! {
impl IntoView {
if key_code == ENTER_KEY {
save(&event_target_value(&ev));
} else if key_code == ESCAPE_KEY {
- set_editing(false);
+ set_editing.set(false);
}
}}
/>
diff --git a/integrations/utils/src/lib.rs b/integrations/utils/src/lib.rs
index fa9b30abcc..594bee6c85 100644
--- a/integrations/utils/src/lib.rs
+++ b/integrations/utils/src/lib.rs
@@ -59,12 +59,10 @@ pub fn html_parts_separated(
// First check runtime env, then build time, then default:
let pkg_path = match std::env::var("CDN_PKG_PATH").ok().map(Cow::from) {
Some(path) => path,
- None => {
- match option_env!("CDN_PKG_PATH").map(Cow::from) {
- Some(path) => path,
- None => format!("/{}", options.site_pkg_dir).into(),
- }
- }
+ None => match option_env!("CDN_PKG_PATH").map(Cow::from) {
+ Some(path) => path,
+ None => format!("/{}", options.site_pkg_dir).into(),
+ },
};
let output_name = &options.output_name;
let nonce = use_nonce();
diff --git a/leptos/Cargo.toml b/leptos/Cargo.toml
index 918764f1fe..f407058e4a 100644
--- a/leptos/Cargo.toml
+++ b/leptos/Cargo.toml
@@ -16,13 +16,18 @@ leptos_macro = { workspace = true }
leptos_reactive = { workspace = true }
leptos_server = { workspace = true }
leptos_config = { workspace = true }
-leptos-spin-macro = { version="0.1", optional = true}
+leptos-spin-macro = { version = "0.1", optional = true }
tracing = "0.1"
typed-builder = "0.18"
typed-builder-macro = "0.18"
serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true }
-server_fn = { workspace = true, features = ["form-redirects", "browser", "url", "cbor"] }
+server_fn = { workspace = true, features = [
+ "form-redirects",
+ "browser",
+ "url",
+ "cbor",
+] }
web-sys = { version = "0.3.63", features = [
"ShadowRoot",
"ShadowRootInit",
@@ -68,10 +73,7 @@ miniserde = ["leptos_reactive/miniserde"]
rkyv = ["leptos_reactive/rkyv"]
tracing = ["leptos_macro/tracing"]
nonce = ["leptos_dom/nonce"]
-spin = [
- "leptos_reactive/spin",
- "leptos-spin-macro"
-]
+spin = ["leptos_reactive/spin", "leptos-spin-macro"]
experimental-islands = [
"leptos_dom/experimental-islands",
"leptos_macro/experimental-islands",
@@ -81,7 +83,7 @@ experimental-islands = [
]
trace-component-props = [
"leptos_dom/trace-component-props",
- "leptos_macro/trace-component-props"
+ "leptos_macro/trace-component-props",
]
[package.metadata.cargo-all-features]
@@ -92,9 +94,10 @@ denylist = [
"rustls",
"default-tls",
"wasm-bindgen",
+ "rkyv", # was causing clippy issues on nightly
"trace-component-props",
"spin",
- "experimental-islands"
+ "experimental-islands",
]
skip_feature_sets = [
[
diff --git a/leptos/src/error_boundary.rs b/leptos/src/error_boundary.rs
index 29a5fecb36..4c187a7087 100644
--- a/leptos/src/error_boundary.rs
+++ b/leptos/src/error_boundary.rs
@@ -1,10 +1,7 @@
use crate::Children;
use leptos_dom::{Errors, HydrationCtx, IntoView};
use leptos_macro::{component, view};
-use leptos_reactive::{
- create_rw_signal, provide_context, run_as_child, signal_prelude::*,
- RwSignal,
-};
+use leptos_reactive::{provide_context, run_as_child, signal_prelude::*};
/// When you render a `Result<_, _>` in your view, in the `Err` case it will
/// render nothing, and search up through the view tree for an ` `.
diff --git a/leptos/src/show.rs b/leptos/src/show.rs
index f05a0253c3..33a4090cef 100644
--- a/leptos/src/show.rs
+++ b/leptos/src/show.rs
@@ -1,6 +1,6 @@
use leptos::{component, ChildrenFn, ViewFn};
use leptos_dom::IntoView;
-use leptos_reactive::{create_memo, signal_prelude::*};
+use leptos_reactive::signal_prelude::*;
/// A component that will show its children when the `when` condition is `true`,
/// and show the fallback when it is `false`, without rerendering every time
diff --git a/leptos_config/src/lib.rs b/leptos_config/src/lib.rs
index 77cfffeb83..dd78271c39 100644
--- a/leptos_config/src/lib.rs
+++ b/leptos_config/src/lib.rs
@@ -5,10 +5,7 @@ pub mod errors;
use crate::errors::LeptosConfigError;
use config::{Case, Config, File, FileFormat};
use regex::Regex;
-use std::{
- convert::TryFrom, env::VarError, fs, net::SocketAddr, path::Path,
- str::FromStr,
-};
+use std::{env::VarError, fs, net::SocketAddr, path::Path, str::FromStr};
use typed_builder::TypedBuilder;
/// A Struct to allow us to parse LeptosOptions from the file. Not really needed, most interactions should
diff --git a/leptos_dom/src/components/each.rs b/leptos_dom/src/components/each.rs
index 8fed794ffc..fa18c4d024 100644
--- a/leptos_dom/src/components/each.rs
+++ b/leptos_dom/src/components/each.rs
@@ -516,8 +516,10 @@ where
}
}
+#[cfg(all(target_arch = "wasm32", feature = "web"))]
struct HashRun(T);
+#[cfg(all(target_arch = "wasm32", feature = "web"))]
impl fmt::Debug for HashRun {
#[inline]
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
diff --git a/leptos_dom/src/components/errors.rs b/leptos_dom/src/components/errors.rs
index 56228d47a2..0b0159da01 100644
--- a/leptos_dom/src/components/errors.rs
+++ b/leptos_dom/src/components/errors.rs
@@ -1,6 +1,6 @@
use crate::{HydrationCtx, IntoView};
use cfg_if::cfg_if;
-use leptos_reactive::{signal_prelude::*, use_context, RwSignal};
+use leptos_reactive::{signal_prelude::*, use_context};
use server_fn::error::Error;
use std::{borrow::Cow, collections::HashMap};
diff --git a/leptos_dom/src/helpers.rs b/leptos_dom/src/helpers.rs
index c9f5e4502b..7a6c176c7f 100644
--- a/leptos_dom/src/helpers.rs
+++ b/leptos_dom/src/helpers.rs
@@ -39,10 +39,13 @@ pub fn location_hash() -> Option {
if is_server() {
None
} else {
- location().hash().ok().map(|hash| match hash.chars().next() {
- Some('#') => hash[1..].to_string(),
- _ => hash,
- })
+ location()
+ .hash()
+ .ok()
+ .map(|hash| match hash.chars().next() {
+ Some('#') => hash[1..].to_string(),
+ _ => hash,
+ })
}
}
diff --git a/leptos_dom/src/lib.rs b/leptos_dom/src/lib.rs
index 9c0f005cbb..20dcc3fca7 100644
--- a/leptos_dom/src/lib.rs
+++ b/leptos_dom/src/lib.rs
@@ -774,9 +774,26 @@ impl View {
});
}
Self::CoreComponent(c) => match c {
- CoreComponent::DynChild(_) => {}
- CoreComponent::Each(_) => {}
- _ => {}
+ CoreComponent::DynChild(d) => {
+ if let Some(subview) = *d.child.take() {
+ let subview = subview.on(event, event_handler);
+ d.child.replace(Box::new(Some(subview)));
+ }
+ }
+ CoreComponent::Each(each) => {
+ let event_handler = Rc::new(RefCell::new(event_handler));
+ let new_children = each.children.take().into_iter().map(|item| {
+ if let Some(mut item) = item {
+ let event_handler = Rc::clone(&event_handler);
+ item.child = item.child.on(event.clone(), Box::new(move |e| event_handler.borrow_mut()(e)));
+ Some(item)
+ } else {
+ None
+ }
+ }).collect::>();
+ each.children.replace(new_children);
+ }
+ CoreComponent::Unit(_) => {}
},
_ => {}
}
@@ -1168,6 +1185,17 @@ impl IntoView for Cow<'static, str> {
}
}
+impl IntoView for Rc {
+ #[cfg_attr(
+ any(debug_assertions, feature = "ssr"),
+ instrument(level = "trace", name = "#text", skip_all)
+ )]
+ #[inline(always)]
+ fn into_view(self) -> View {
+ View::Text(Text::new(self.into()))
+ }
+}
+
impl IntoView for Oco<'static, str> {
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
diff --git a/leptos_dom/src/macro_helpers/tracing_property.rs b/leptos_dom/src/macro_helpers/tracing_property.rs
index 365cef56f2..e23f5c4f09 100644
--- a/leptos_dom/src/macro_helpers/tracing_property.rs
+++ b/leptos_dom/src/macro_helpers/tracing_property.rs
@@ -155,9 +155,8 @@ fn match_serialize() {
}
#[test]
+#[allow(clippy::needless_borrow)]
fn match_no_serialize() {
- #![allow(clippy::needless_borrow)]
-
struct CustomStruct {
field: &'static str,
}
diff --git a/leptos_dom/src/node_ref.rs b/leptos_dom/src/node_ref.rs
index 0f71b0b46a..61dbb952bf 100644
--- a/leptos_dom/src/node_ref.rs
+++ b/leptos_dom/src/node_ref.rs
@@ -1,7 +1,5 @@
use crate::{html::ElementDescriptor, HtmlElement};
-use leptos_reactive::{
- create_render_effect, create_rw_signal, signal_prelude::*, RwSignal,
-};
+use leptos_reactive::{create_render_effect, signal_prelude::*};
use std::cell::Cell;
/// Contains a shared reference to a DOM node created while using the `view`
diff --git a/leptos_dom/src/ssr.rs b/leptos_dom/src/ssr.rs
index 2de8067abc..262dac6e40 100644
--- a/leptos_dom/src/ssr.rs
+++ b/leptos_dom/src/ssr.rs
@@ -9,7 +9,7 @@ use crate::{
use cfg_if::cfg_if;
use futures::{stream::FuturesUnordered, Future, Stream, StreamExt};
use itertools::Itertools;
-use leptos_reactive::{Oco, *};
+use leptos_reactive::*;
use std::pin::Pin;
type PinnedFuture = Pin>>;
diff --git a/leptos_hot_reload/src/lib.rs b/leptos_hot_reload/src/lib.rs
index 02f33330ec..388ab0a5e6 100644
--- a/leptos_hot_reload/src/lib.rs
+++ b/leptos_hot_reload/src/lib.rs
@@ -78,12 +78,20 @@ impl ViewMacros {
for view in visitor.views {
let span = view.span();
let id = span_to_stable_id(path, span.start().line);
- let tokens = view.tokens.clone().into_iter();
- // TODO handle class = ...
- let rsx =
- rstml::parse2(tokens.collect::())?;
- let template = LNode::parse_view(rsx)?;
- views.push(MacroInvocation { id, template });
+ if view.tokens.is_empty() {
+ views.push(MacroInvocation {
+ id,
+ template: LNode::Fragment(Vec::new()),
+ });
+ } else {
+ let tokens = view.tokens.clone().into_iter();
+ // TODO handle class = ...
+ let rsx = rstml::parse2(
+ tokens.collect::(),
+ )?;
+ let template = LNode::parse_view(rsx)?;
+ views.push(MacroInvocation { id, template });
+ }
}
Ok(views)
}
diff --git a/leptos_macro/Makefile.toml b/leptos_macro/Makefile.toml
index edc1668737..4a32f30846 100644
--- a/leptos_macro/Makefile.toml
+++ b/leptos_macro/Makefile.toml
@@ -11,13 +11,13 @@ dependencies = [
[tasks.test-leptos_macro-example]
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
command = "cargo"
-args = ["+nightly-2024-01-29", "test", "--doc"]
+args = ["+nightly-2024-03-31", "test", "--doc"]
cwd = "example"
install_crate = false
[tasks.doc-leptos_macro-example]
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
command = "cargo"
-args = ["+nightly-2024-01-29", "doc"]
+args = ["+nightly-2024-03-31", "doc"]
cwd = "example"
install_crate = false
diff --git a/leptos_macro/src/view/server_template.rs b/leptos_macro/src/view/server_template.rs
index 970ecce5c3..a4e4eb9c0c 100644
--- a/leptos_macro/src/view/server_template.rs
+++ b/leptos_macro/src/view/server_template.rs
@@ -429,6 +429,21 @@ fn attribute_to_tokens_ssr<'a>(
{ _ = #value; }
});
}
+ } else if let Some(directive_name) = name.strip_prefix("use:") {
+ let handler = syn::Ident::new(directive_name, attr.key.span());
+ let value = attr.value();
+ let value = value.map(|value| {
+ quote! {
+ _ = #value;
+ }
+ });
+ exprs_for_compiler.push(quote! {
+ #[allow(unused_braces)]
+ {
+ _ = #handler;
+ #value
+ }
+ });
} else if name == "inner_html" {
return attr.value();
} else {
diff --git a/leptos_macro/tests/ui/component.stderr b/leptos_macro/tests/ui/component.stderr
index 96c4b2e7e8..798b73c582 100644
--- a/leptos_macro/tests/ui/component.stderr
+++ b/leptos_macro/tests/ui/component.stderr
@@ -41,15 +41,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
error: unexpected end of input, expected `=` or `(`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component.rs:36:40
+ --> tests/ui/component.rs:35:1
|
-36 | fn default_without_value(#[prop(default)] default: bool) -> impl IntoView {
- | ^
+35 | #[component]
+ | ^^^^^^^^^^^^
+ |
+ = note: this error originates in the attribute macro `component` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component.rs:42:22
+ --> tests/ui/component.rs:40:1
+ |
+40 | #[component]
+ | ^^^^^^^^^^^^
|
-42 | #[prop(default= |)] default: bool,
- | ^
+ = note: this error originates in the attribute macro `component` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/leptos_macro/tests/ui/component_absolute.stderr b/leptos_macro/tests/ui/component_absolute.stderr
index 862c28af21..3341b8e873 100644
--- a/leptos_macro/tests/ui/component_absolute.stderr
+++ b/leptos_macro/tests/ui/component_absolute.stderr
@@ -33,15 +33,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
error: unexpected end of input, expected `=` or `(`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component_absolute.rs:32:19
+ --> tests/ui/component_absolute.rs:30:1
|
-32 | #[prop(default)] default: bool,
- | ^
+30 | #[::leptos::component]
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in the attribute macro `::leptos::component` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component_absolute.rs:39:22
+ --> tests/ui/component_absolute.rs:37:1
+ |
+37 | #[::leptos::component]
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
-39 | #[prop(default= |)] default: bool,
- | ^
+ = note: this error originates in the attribute macro `::leptos::component` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/leptos_reactive/Cargo.toml b/leptos_reactive/Cargo.toml
index 0e8d8ef401..45169e934e 100644
--- a/leptos_reactive/Cargo.toml
+++ b/leptos_reactive/Cargo.toml
@@ -72,7 +72,7 @@ hydrate = [
"dep:web-sys",
]
ssr = ["dep:tokio"]
-nightly = ["rkyv?/copy"]
+nightly = [] #["rkyv?/copy"] # not working on more recent nightlys
serde = []
serde-lite = ["dep:serde-lite"]
miniserde = ["dep:miniserde"]
@@ -81,7 +81,7 @@ experimental-islands = []
spin = ["ssr", "dep:spin-sdk"]
[package.metadata.cargo-all-features]
-denylist = ["nightly"]
+denylist = ["nightly", "rkyv"]
skip_feature_sets = [
[
"csr",
diff --git a/leptos_reactive/tests/untracked.rs b/leptos_reactive/tests/untracked.rs
index 11ccc90ba4..39d02893e4 100644
--- a/leptos_reactive/tests/untracked.rs
+++ b/leptos_reactive/tests/untracked.rs
@@ -1,6 +1,5 @@
use leptos_reactive::{
- create_isomorphic_effect, create_runtime, create_signal, signal_prelude::*,
- SignalGetUntracked, SignalSetUntracked,
+ create_isomorphic_effect, create_runtime, signal_prelude::*,
};
#[test]
diff --git a/leptos_server/src/action.rs b/leptos_server/src/action.rs
index 4f3316d47a..5f91959b12 100644
--- a/leptos_server/src/action.rs
+++ b/leptos_server/src/action.rs
@@ -2,9 +2,8 @@
#[cfg(debug_assertions)]
use leptos_reactive::console_warn;
use leptos_reactive::{
- create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
- spawn_local, store_value, try_batch, use_context, ReadSignal, RwSignal,
- StoredValue,
+ is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
+ try_batch, use_context, StoredValue,
};
use server_fn::{error::ServerFnUrlError, ServerFn, ServerFnError};
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc};
diff --git a/leptos_server/src/multi_action.rs b/leptos_server/src/multi_action.rs
index d1deb7e718..b9e45ffe80 100644
--- a/leptos_server/src/multi_action.rs
+++ b/leptos_server/src/multi_action.rs
@@ -1,6 +1,6 @@
use leptos_reactive::{
- create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
- spawn_local, store_value, untrack, ReadSignal, RwSignal, StoredValue,
+ is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
+ untrack, StoredValue,
};
use server_fn::{ServerFn, ServerFnError};
use std::{future::Future, pin::Pin, rc::Rc};
diff --git a/meta/Cargo.toml b/meta/Cargo.toml
index 73ca0e39db..d2d266f41a 100644
--- a/meta/Cargo.toml
+++ b/meta/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "leptos_meta"
-version = "0.6.9"
+version = "0.6.10"
edition = "2021"
authors = ["Greg Johnston"]
license = "MIT"
diff --git a/meta/src/title.rs b/meta/src/title.rs
index 3fc2ab6f76..746ecec15d 100644
--- a/meta/src/title.rs
+++ b/meta/src/title.rs
@@ -1,4 +1,4 @@
-use crate::{use_head, TextProp};
+use crate::use_head;
use cfg_if::cfg_if;
use leptos::*;
use std::{cell::RefCell, rc::Rc};
diff --git a/router/Cargo.toml b/router/Cargo.toml
index 3d3c9a5d7f..32cff34d8b 100644
--- a/router/Cargo.toml
+++ b/router/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "leptos_router"
-version = "0.6.9"
+version = "0.6.10"
edition = "2021"
authors = ["Greg Johnston", "Ben Wishovich"]
license = "MIT"
diff --git a/router/src/components/form.rs b/router/src/components/form.rs
index 96f75ba842..f34e629f49 100644
--- a/router/src/components/form.rs
+++ b/router/src/components/form.rs
@@ -470,15 +470,13 @@ where
}
});
}
- let action_url = if let Some(url) = action.url() {
- url
- } else {
+ let action_url = action.url().unwrap_or_else(|| {
debug_warn!(
" action needs a URL. Either use \
create_server_action() or Action::using_server_fn()."
);
String::new()
- };
+ });
let version = action.version();
let value = action.value();
@@ -570,15 +568,13 @@ where
}
});
}
- let action_url = if let Some(url) = action.url() {
- url
- } else {
+ let action_url = action.url().unwrap_or_else(|| {
debug_warn!(
" action needs a URL. Either use \
create_server_action() or Action::using_server_fn()."
);
String::new()
- };
+ });
let on_submit = move |ev: SubmitEvent| {
if ev.default_prevented() {
diff --git a/router/src/components/link.rs b/router/src/components/link.rs
index 08a0524be4..7b1dbb5225 100644
--- a/router/src/components/link.rs
+++ b/router/src/components/link.rs
@@ -1,5 +1,5 @@
use crate::{use_location, use_resolved_path, State};
-use leptos::{leptos_dom::IntoView, *};
+use leptos::*;
use std::borrow::Cow;
/// Describes a value that is either a static or a reactive URL, i.e.,
diff --git a/router/src/hooks.rs b/router/src/hooks.rs
index 0c53689ac5..41ceb52cf5 100644
--- a/router/src/hooks.rs
+++ b/router/src/hooks.rs
@@ -3,8 +3,7 @@ use crate::{
RouterContext,
};
use leptos::{
- create_memo, request_animation_frame, signal_prelude::*, use_context,
- window, Memo, Oco,
+ request_animation_frame, signal_prelude::*, use_context, window, Oco,
};
use std::{rc::Rc, str::FromStr};
@@ -134,9 +133,9 @@ pub fn use_params_map() -> Memo {
/// Returns the current route params, parsed into the given type, or an error.
#[track_caller]
-pub fn use_params() -> Memo>
+pub fn use_params() -> Memo>
where
- T: PartialEq,
+ T: Params + PartialEq,
{
let route = use_route();
create_memo(move |_| route.params().with(T::from_map))
@@ -150,9 +149,9 @@ pub fn use_query_map() -> Memo {
/// Returns the current URL search query, parsed into the given type, or an error.
#[track_caller]
-pub fn use_query() -> Memo>
+pub fn use_query() -> Memo>
where
- T: PartialEq,
+ T: Params + PartialEq,
{
let router = use_router();
create_memo(move |_| router.inner.location.query.with(|m| T::from_map(m)))
diff --git a/server_fn/Cargo.toml b/server_fn/Cargo.toml
index 0ac4889bee..ff7130910d 100644
--- a/server_fn/Cargo.toml
+++ b/server_fn/Cargo.toml
@@ -128,6 +128,7 @@ denylist = [
"ciborium",
"hyper",
"inventory",
+ "rkyv",
]
skip_feature_sets = [
[
diff --git a/server_fn_macro/Cargo.toml b/server_fn_macro/Cargo.toml
index b5ae3b825a..6f9071ce30 100644
--- a/server_fn_macro/Cargo.toml
+++ b/server_fn_macro/Cargo.toml
@@ -4,6 +4,7 @@ version = { workspace = true }
edition = "2021"
authors = ["Greg Johnston"]
license = "MIT"
+repository = "https://github.com/leptos-rs/leptos"
description = "RPC for any web framework."
readme = "../README.md"
diff --git a/server_fn_macro/src/lib.rs b/server_fn_macro/src/lib.rs
index c41be02648..b423c63bec 100644
--- a/server_fn_macro/src/lib.rs
+++ b/server_fn_macro/src/lib.rs
@@ -13,7 +13,7 @@ use syn::{
parse::{Parse, ParseStream},
punctuated::Punctuated,
spanned::Spanned,
- Type, *,
+ *,
};
/// The implementation of the `server` macro.
bool, and these signals all implement Fn() - class:red=red - class:right=right - class:italics=italics - class:smallcaps=smallcaps + class:red=move||red.get() + class:right=move||right.get() + class:italics=move||italics.get() + class:smallcaps=move||smallcaps.get() > "Lorem ipsum sit dolor amet."
@@ -82,7 +82,7 @@ pub fn ButtonB( view! { diff --git a/examples/portal/Cargo.toml b/examples/portal/Cargo.toml index 69ae4f9e20..9dfa20ef24 100644 --- a/examples/portal/Cargo.toml +++ b/examples/portal/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -leptos = { path = "../../leptos", features = ["csr", "nightly"] } +leptos = { path = "../../leptos", features = ["csr"] } log = "0.4" console_log = "1" console_error_panic_hook = "0.1.7" diff --git a/examples/portal/rust-toolchain.toml b/examples/portal/rust-toolchain.toml index 055e912d2e..99fa95aaaf 100644 --- a/examples/portal/rust-toolchain.toml +++ b/examples/portal/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-01-29" +channel = "nightly-2024-03-31" diff --git a/examples/portal/src/lib.rs b/examples/portal/src/lib.rs index 989167ff4e..200a4d2244 100644 --- a/examples/portal/src/lib.rs +++ b/examples/portal/src/lib.rs @@ -7,23 +7,23 @@ pub fn App() -> impl IntoView { view! {Length is {result}
+Length is {move||result.get()}
} } @@ -307,7 +309,7 @@ pub async fn rkyv_example(input: String) -> ResultUsing
@@ -317,14 +319,14 @@ pub fn RkyvExample() -> impl IntoView {rkyv
encoding{input}
+{move||input.get()}
Uploading {filename}
})} - {move || max().map(|max| view! { - + {move || filename.get().map(|filename| view! {Uploading {filename}
})} + {move || max.get().map(|max| view! { + })} } } @@ -665,7 +667,7 @@ pub fn CustomErrorTypes() -> impl IntoView { let value = input_ref.get().unwrap().value(); spawn_local(async move { let data = ascii_uppercase(value).await; - set_result(Some(data)); + set_result.set(Some(data)); }); } > @@ -789,13 +791,13 @@ pub fn CustomEncoding() -> impl IntoView { let value = input_ref.get().unwrap().value(); spawn_local(async move { let new_value = why_not(value, ", but in TOML!!!".to_string()).await.unwrap(); - set_result(new_value.0.modified); + set_result.set(new_value.0.modified); }); } > Submit -{result}
+{move||result.get()}
} } diff --git a/examples/server_fns_axum/src/error_template.rs b/examples/server_fns_axum/src/error_template.rs index 0a1731abe1..d68b2b58f7 100644 --- a/examples/server_fns_axum/src/error_template.rs +++ b/examples/server_fns_axum/src/error_template.rs @@ -1,5 +1,5 @@ use crate::errors::TodoAppError; -use leptos::{Errors, *}; +use leptos::*; #[cfg(feature = "ssr")] use leptos_axum::ResponseOptions; diff --git a/examples/session_auth_axum/Cargo.toml b/examples/session_auth_axum/Cargo.toml index 8e13a0a7a6..b78e2f39e6 100644 --- a/examples/session_auth_axum/Cargo.toml +++ b/examples/session_auth_axum/Cargo.toml @@ -12,10 +12,10 @@ console_log = "1.0" rand = { version = "0.8", features = ["min_const_gen"], optional = true } console_error_panic_hook = "0.1" futures = "0.3" -leptos = { path = "../../leptos", features = ["nightly"] } -leptos_meta = { path = "../../meta", features = ["nightly"] } +leptos = { path = "../../leptos" } +leptos_meta = { path = "../../meta"} leptos_axum = { path = "../../integrations/axum", optional = true } -leptos_router = { path = "../../router", features = ["nightly"] } +leptos_router = { path = "../../router" } log = "0.4" simple_logger = "4.0" serde = { version = "1.0", features = ["derive"] } diff --git a/examples/session_auth_axum/rust-toolchain.toml b/examples/session_auth_axum/rust-toolchain.toml index 055e912d2e..99fa95aaaf 100644 --- a/examples/session_auth_axum/rust-toolchain.toml +++ b/examples/session_auth_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-01-29" +channel = "nightly-2024-03-31" diff --git a/examples/session_auth_axum/src/error_template.rs b/examples/session_auth_axum/src/error_template.rs index 16e81df545..d1ea5f6d03 100644 --- a/examples/session_auth_axum/src/error_template.rs +++ b/examples/session_auth_axum/src/error_template.rs @@ -1,5 +1,5 @@ use crate::errors::TodoAppError; -use leptos::{Errors, *}; +use leptos::*; #[cfg(feature = "ssr")] use leptos_axum::ResponseOptions; diff --git a/examples/slots/Cargo.toml b/examples/slots/Cargo.toml index 7acc9d0809..70fcf81f72 100644 --- a/examples/slots/Cargo.toml +++ b/examples/slots/Cargo.toml @@ -8,7 +8,7 @@ codegen-units = 1 lto = true [dependencies] -leptos = { path = "../../leptos", features = ["csr", "nightly"] } +leptos = { path = "../../leptos", features = ["csr"] } console_log = "1" log = "0.4" console_error_panic_hook = "0.1.7" diff --git a/examples/slots/rust-toolchain.toml b/examples/slots/rust-toolchain.toml index 055e912d2e..99fa95aaaf 100644 --- a/examples/slots/rust-toolchain.toml +++ b/examples/slots/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-01-29" +channel = "nightly-2024-03-31" diff --git a/examples/slots/src/lib.rs b/examples/slots/src/lib.rs index 6c3fcb44fb..2577681c81 100644 --- a/examples/slots/src/lib.rs +++ b/examples/slots/src/lib.rs @@ -28,9 +28,9 @@ fn SlotIf( #[prop(optional)] fallback: Option-- "All"
- - "Active"
- - "Completed"
+ - "All"
+ - "Active"
+ - "Completed"