From ca07d29db5ae4451c0b2fe89764bcdd41b8d0a01 Mon Sep 17 00:00:00 2001
From: Sam Judelson <64875465+sjud@users.noreply.github.com>
Date: Thu, 4 Apr 2024 23:11:28 -0400
Subject: [PATCH] stable examples change (#2497)
---
examples/animated_show/Cargo.toml | 2 +-
examples/counter/Cargo.toml | 2 +-
examples/counter/src/lib.rs | 4 +-
examples/counter_isomorphic/Cargo.toml | 3 +-
examples/counters/Cargo.toml | 2 +-
examples/counters/src/lib.rs | 13 +-
examples/counters_stable/.gitignore | 20 ---
examples/counters_stable/Cargo.toml | 28 -----
examples/counters_stable/Makefile.toml | 18 ---
examples/counters_stable/README.md | 11 --
examples/counters_stable/e2e/.gitignore | 4 -
.../counters_stable/e2e/package-lock.json | 83 ------------
examples/counters_stable/e2e/package.json | 7 --
.../counters_stable/e2e/playwright.config.ts | 77 ------------
.../e2e/tests/add_1k_counters.spec.ts | 19 ---
.../e2e/tests/add_counter.spec.ts | 15 ---
.../e2e/tests/clear_counters.spec.ts | 18 ---
.../e2e/tests/decrement_count.spec.ts | 16 ---
.../e2e/tests/enter_count.spec.ts | 30 -----
.../e2e/tests/fixtures/counters_page.ts | 98 ---------------
.../e2e/tests/increment_count.spec.ts | 16 ---
.../e2e/tests/remove_counter.spec.ts | 17 ---
.../e2e/tests/view_counters.spec.ts | 19 ---
examples/counters_stable/index.html | 7 --
examples/counters_stable/package.json | 11 --
examples/counters_stable/src/lib.rs | 118 ------------------
examples/counters_stable/src/main.rs | 8 --
.../tests/web/add_1k_counters.rs | 17 ---
.../counters_stable/tests/web/add_counter.rs | 17 ---
.../tests/web/clear_counters.rs | 19 ---
.../tests/web/decrement_counter.rs | 18 ---
.../counters_stable/tests/web/enter_count.rs | 34 -----
.../tests/web/fixtures/counters_page.rs | 112 -----------------
.../counters_stable/tests/web/fixtures/mod.rs | 1 -
.../tests/web/increment_counter.rs | 18 ---
examples/counters_stable/tests/web/main.rs | 16 ---
.../tests/web/remove_counter.rs | 18 ---
.../tests/web/view_counters.rs | 22 ----
examples/directives/Cargo.toml | 2 +-
examples/errors_axum/Cargo.toml | 2 +-
examples/fetch/Cargo.toml | 2 +-
examples/fetch/src/lib.rs | 4 +-
examples/gtk/Cargo.toml | 2 +-
examples/gtk/src/main.rs | 2 +-
examples/hackernews/src/routes/story.rs | 2 +-
examples/hackernews/src/routes/users.rs | 2 +-
examples/hackernews_axum/Cargo.toml | 6 +-
.../hackernews_axum/src/error_template.rs | 4 +-
.../hackernews_axum/src/routes/stories.rs | 2 +-
examples/hackernews_axum/src/routes/story.rs | 10 +-
examples/hackernews_axum/src/routes/users.rs | 2 +-
examples/hackernews_islands_axum/Cargo.toml | 5 +-
.../src/error_template.rs | 4 +-
.../src/routes/stories.rs | 2 +-
.../src/routes/story.rs | 8 +-
.../src/routes/users.rs | 2 +-
examples/hackernews_js_fetch/Cargo.toml | 6 +-
.../hackernews_js_fetch/src/error_template.rs | 4 +-
.../hackernews_js_fetch/src/routes/stories.rs | 2 +-
.../hackernews_js_fetch/src/routes/story.rs | 8 +-
.../hackernews_js_fetch/src/routes/users.rs | 2 +-
examples/js-framework-benchmark/Cargo.toml | 2 +-
examples/js-framework-benchmark/src/lib.rs | 18 +--
examples/login_with_token_csr_only/Cargo.toml | 4 +-
examples/parent_child/Cargo.toml | 2 +-
examples/parent_child/src/lib.rs | 10 +-
examples/portal/Cargo.toml | 2 +-
examples/portal/src/lib.rs | 10 +-
examples/router/Cargo.toml | 6 +-
examples/router/src/lib.rs | 10 +-
examples/server_fns_axum/Cargo.toml | 6 +-
examples/server_fns_axum/src/app.rs | 44 +++----
examples/session_auth_axum/Cargo.toml | 6 +-
examples/slots/Cargo.toml | 2 +-
examples/slots/src/lib.rs | 12 +-
examples/ssr_modes/Cargo.toml | 6 +-
examples/ssr_modes/src/app.rs | 6 +-
examples/ssr_modes_axum/Cargo.toml | 6 +-
examples/ssr_modes_axum/src/app.rs | 6 +-
examples/tailwind_actix/Cargo.toml | 6 +-
examples/tailwind_actix/src/app.rs | 4 +-
examples/tailwind_axum/Cargo.toml | 6 +-
examples/tailwind_axum/src/app.rs | 2 +-
examples/tailwind_csr/Cargo.toml | 6 +-
examples/tailwind_csr/src/app.rs | 4 +-
examples/timer/Cargo.toml | 2 +-
examples/timer/src/lib.rs | 8 +-
examples/todo_app_sqlite/Cargo.toml | 6 +-
examples/todo_app_sqlite_axum/Cargo.toml | 6 +-
examples/todo_app_sqlite_csr/Cargo.toml | 6 +-
90 files changed, 168 insertions(+), 1089 deletions(-)
delete mode 100644 examples/counters_stable/.gitignore
delete mode 100644 examples/counters_stable/Cargo.toml
delete mode 100644 examples/counters_stable/Makefile.toml
delete mode 100644 examples/counters_stable/README.md
delete mode 100644 examples/counters_stable/e2e/.gitignore
delete mode 100644 examples/counters_stable/e2e/package-lock.json
delete mode 100644 examples/counters_stable/e2e/package.json
delete mode 100644 examples/counters_stable/e2e/playwright.config.ts
delete mode 100644 examples/counters_stable/e2e/tests/add_1k_counters.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/add_counter.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/clear_counters.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/decrement_count.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/enter_count.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/fixtures/counters_page.ts
delete mode 100644 examples/counters_stable/e2e/tests/increment_count.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/remove_counter.spec.ts
delete mode 100644 examples/counters_stable/e2e/tests/view_counters.spec.ts
delete mode 100644 examples/counters_stable/index.html
delete mode 100644 examples/counters_stable/package.json
delete mode 100644 examples/counters_stable/src/lib.rs
delete mode 100644 examples/counters_stable/src/main.rs
delete mode 100644 examples/counters_stable/tests/web/add_1k_counters.rs
delete mode 100644 examples/counters_stable/tests/web/add_counter.rs
delete mode 100644 examples/counters_stable/tests/web/clear_counters.rs
delete mode 100644 examples/counters_stable/tests/web/decrement_counter.rs
delete mode 100644 examples/counters_stable/tests/web/enter_count.rs
delete mode 100644 examples/counters_stable/tests/web/fixtures/counters_page.rs
delete mode 100644 examples/counters_stable/tests/web/fixtures/mod.rs
delete mode 100644 examples/counters_stable/tests/web/increment_counter.rs
delete mode 100644 examples/counters_stable/tests/web/main.rs
delete mode 100644 examples/counters_stable/tests/web/remove_counter.rs
delete mode 100644 examples/counters_stable/tests/web/view_counters.rs
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/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/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/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/src/lib.rs b/examples/counters/src/lib.rs
index 59428cc18d..3df34397c7 100644
--- a/examples/counters/src/lib.rs
+++ b/examples/counters/src/lib.rs
@@ -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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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_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_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"
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/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/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/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/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