This PR adds a new way to declare lists by adding <N> after the for keyword:
view! {
<ol.unbounded>
{
// Still works as it used to!
for (0..10).map(|n| view! { <li>{n} })
}
</ol>
<ol.bounded>
{
// A list that's bound to max length of 10
for<10> (0..10).map(|n| view! { <li>{n} })
}
</ol>
}
Unlike the default unbounded lists, bounded lists are array-backed and therefore do not cause any allocations.
This PR adds a new way to declare lists by adding
<N>
after thefor
keyword:Unlike the default unbounded lists, bounded lists are array-backed and therefore do not cause any allocations.