+
+
}
}
diff --git a/examples/dyn_create_destroy_apps/src/counter.rs b/examples/dyn_create_destroy_apps/src/counter.rs
index 3154c19fa8d..4ff1aca1371 100644
--- a/examples/dyn_create_destroy_apps/src/counter.rs
+++ b/examples/dyn_create_destroy_apps/src/counter.rs
@@ -44,19 +44,17 @@ impl Component for CounterModel {
let destroy_callback = ctx.props().destroy_callback.clone();
html! {
- <>
- // Display the current value of the counter
-
- { "App has lived for " }
- { self.counter }
- { " ticks" }
-
+ // Display the current value of the counter
+
+ { "App has lived for " }
+ { self.counter }
+ { " ticks" }
+
- // Add button to send a destroy command to the parent app
-
- >
+ // Add button to send a destroy command to the parent app
+
}
}
diff --git a/examples/dyn_create_destroy_apps/src/main.rs b/examples/dyn_create_destroy_apps/src/main.rs
index 1dd0408f2ec..da5360fdd89 100644
--- a/examples/dyn_create_destroy_apps/src/main.rs
+++ b/examples/dyn_create_destroy_apps/src/main.rs
@@ -89,20 +89,18 @@ impl Component for App {
// We will only render once, and then do the rest of the DOM changes
// by mounting/destroying appinstances of CounterModel
html! {
- <>
-
- // Create button to create a new app
-
-
- // Create a container for all the app instances
-
-
- >
+
+ // Create button to create a new app
+
+
+ // Create a container for all the app instances
+
- { for author.keywords.iter().map(|tag| html! { { tag } }) }
+ for tag in &author.keywords {
+ { tag }
+ }
diff --git a/examples/function_router/src/pages/author_list.rs b/examples/function_router/src/pages/author_list.rs
index 82874be6218..aa8944d8511 100644
--- a/examples/function_router/src/pages/author_list.rs
+++ b/examples/function_router/src/pages/author_list.rs
@@ -11,16 +11,6 @@ const CAROUSEL_DELAY_MS: u32 = 15000;
pub fn AuthorList() -> Html {
let seeds = use_state(random_author_seeds);
- let authors = seeds.iter().map(|&seed| {
- html! {
-
-
-
-
-
- }
- });
-
let on_complete = {
let seeds = seeds.clone();
@@ -50,7 +40,13 @@ pub fn AuthorList() -> Html {
- { for authors }
+ for seed in seeds.iter() {
+
+
+
+
+
+ }
diff --git a/examples/function_router/src/pages/home.rs b/examples/function_router/src/pages/home.rs
index 949913b345a..f43d6528907 100644
--- a/examples/function_router/src/pages/home.rs
+++ b/examples/function_router/src/pages/home.rs
@@ -3,42 +3,40 @@ use yew::prelude::*;
#[function_component]
fn InfoTiles() -> Html {
html! {
- <>
-
-
-
{ "What are yews?" }
-
{ "Everything you need to know!" }
+
+
+
{ "What are yews?" }
+
{ "Everything you need to know!" }
-
- {r#"
- A yew is a small to medium-sized evergreen tree, growing 10 to 20 metres tall, with a trunk up to 2 metres in diameter.
- The bark is thin, scaly brown, coming off in small flakes aligned with the stem.
- The leaves are flat, dark green, 1 to 4 centimetres long and 2 to 3 millimetres broad, arranged spirally on the stem,
- but with the leaf bases twisted to align the leaves in two flat rows either side of the stem,
- except on erect leading shoots where the spiral arrangement is more obvious.
- The leaves are poisonous.
- "#}
-
+
+ {r#"
+ A yew is a small to medium-sized evergreen tree, growing 10 to 20 metres tall, with a trunk up to 2 metres in diameter.
+ The bark is thin, scaly brown, coming off in small flakes aligned with the stem.
+ The leaves are flat, dark green, 1 to 4 centimetres long and 2 to 3 millimetres broad, arranged spirally on the stem,
+ but with the leaf bases twisted to align the leaves in two flat rows either side of the stem,
+ except on erect leading shoots where the spiral arrangement is more obvious.
+ The leaves are poisonous.
+ "#}
+
-
-
-
{ "Who are we?" }
+
+
+
{ "Who are we?" }
-
- { "We're a small team of just 2" }
- { 64 }
- { " members working tirelessly to bring you the low-effort yew content we all desperately crave." }
-
- {r#"
- We put a ton of effort into fact-checking our posts.
- Some say they read like a Wikipedia article - what a compliment!
- "#}
-
+
+ { "We're a small team of just 2" }
+ { 64 }
+ { " members working tirelessly to bring you the low-effort yew content we all desperately crave." }
+
+ {r#"
+ We put a ton of effort into fact-checking our posts.
+ Some say they read like a Wikipedia article - what a compliment!
+ "#}
- >
+
}
}
diff --git a/examples/function_router/src/pages/post.rs b/examples/function_router/src/pages/post.rs
index a41d856e37b..dc12a0a769d 100644
--- a/examples/function_router/src/pages/post.rs
+++ b/examples/function_router/src/pages/post.rs
@@ -83,20 +83,16 @@ pub fn Post(props: &Props) -> Html {
};
let render_section = |section, show_hero| {
- let hero = if show_hero {
- render_section_hero(section)
- } else {
- html! {}
- };
- let paragraphs = section.paragraphs.iter().map(|paragraph| {
- html! {
-
{ paragraph }
- }
- });
html! {
- { hero }
-
{ for paragraphs }
+ if show_hero {
+ render_section_hero(section)
+ }
+