Closed itsgreggreg closed 5 years ago
Thanks for the issue! The parser issue is related to https://github.com/yewstack/yew/issues/606
As for your code sample, using a for loop is not a valid approach. I think you want something like this (untested):
html! {
<div>
{ for (1..10).map(|x| html! { <p>{ format!("{}", x) }</p> }) }
</div>
}
Once #606 is fixed, the for
will not be necessary:
html! {
<div>
{ (1..10).map(|x| html! { <p>{ format!("{}", x) }</p> }) }
</div>
}
Closing in favour of #606 but feel free to re-open if you have any more troubles!
Description
I'm submitting a ...
Cannot use
for
in
inhtml!
macroExpected Results
Actual Results
Context (Environment)