diff --git a/book/src/html-macro/html-macro.md b/book/src/html-macro/html-macro.md index 5f852b65..9028eb1e 100644 --- a/book/src/html-macro/html-macro.md +++ b/book/src/html-macro/html-macro.md @@ -62,8 +62,10 @@ let parent_view = html! {
{ view1 } { view2 } - html! { - Nested html! call + { + html! { + Nested html! call + } }
}; @@ -73,3 +75,38 @@ let html_string = parent_view.to_string(); // Here's what the String looks like: //
Nested html! call
``` + +### Iterable Children + +Any type that implements IntoIter can be used as a child element within a block. + +```rust +let list = vec!["1", "2", "3"] + .map(|item_num| { + html! { +
  • + List item number { text!(item_num) } +
  • + } + }); + +html! { +