fix more examples

This commit is contained in:
Evan Almloff committed 2024-01-16 12:28:21 -06:00
1 parent db35a9b48c
commit 407a82588a
59 files changed
+166 -195

No files matched your search

+4 -4
View File
@@ -5,20 +5,20 @@ fn main() {
}
fn app() -> Element {
rsx!(
render!(
div {
// Use Map directly to lazily pull elements
{(0..10).map(|f| rsx! { "{f}" })},
{(0..10).map(|f| render! { "{f}" })},
// Collect into an intermediate collection if necessary, and call into_iter
{["a", "b", "c", "d", "e", "f"]
.into_iter()
.map(|f| rsx! { "{f}" })
.map(|f| render! { "{f}" })
.collect::<Vec<_>>()
.into_iter()},
// Use optionals
{Some(rsx! { "Some" })},
{Some(render! { "Some" })},
// use a for loop where the body itself is RSX
for name in 0..10 {