From 17adf7cc1467aa1ddd41ffa16fcd3c438068bb98 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Mon, 5 Jun 2023 20:48:22 -0400 Subject: [PATCH] feat: pass components with no props directly into the view as a function that takes only `Scope` (#1144) --- examples/README.md | 7 +++ examples/hackernews/src/lib.rs | 6 +-- examples/hackernews_axum/src/lib.rs | 6 +-- examples/router/src/lib.rs | 12 ++--- examples/ssr_modes/src/app.rs | 4 +- examples/ssr_modes_axum/src/app.rs | 6 +-- leptos/Cargo.toml | 2 +- leptos/src/lib.rs | 83 +++++++++++++++++++++++++++-- leptos_macro/example/src/lib.rs | 1 - leptos_macro/src/component.rs | 50 +++++++++++++---- leptos_macro/src/lib.rs | 18 ++----- leptos_macro/src/view.rs | 29 +++++----- leptos_reactive/src/context.rs | 3 -- 13 files changed, 160 insertions(+), 67 deletions(-) create mode 100644 examples/README.md diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000..d641b1310 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,7 @@ +# Examples + +The examples in this directory are all built and tested against the current `main` branch. + +To the extent that new features have been released or breaking changes have been made since the previous release, the examples are compatible with the `main` branch and not the current release. + +To see the examples as they were at the time of the `0.3.0` release, [click here](https://github.com/leptos-rs/leptos/tree/v0.3.0/examples). \ No newline at end of file diff --git a/examples/hackernews/src/lib.rs b/examples/hackernews/src/lib.rs index 748533e69..3dd6a214d 100644 --- a/examples/hackernews/src/lib.rs +++ b/examples/hackernews/src/lib.rs @@ -22,9 +22,9 @@ pub fn App(cx: Scope) -> impl IntoView {