Closed paulalesius closed 2 years ago
I think this is related to https://github.com/schell/mogwai/issues/82; the discussion there may be useful. I think the short version is "not right now but probably in the next version"
Thank you for the quick reply! I just read that but did not understand what it meant by "fragment", sorry. Closing! 👍
Yes, the next release will allow adding a vector of ViewBuilder
like so:
let vs: Vec<ViewBuilder<Dom>> = builder! {
<div>"hello"</div>
<div>"hola"</div>
<div>"kia ora"</div>
};
let s: ViewBuilder<Dom> = builder! {
<section>{vs}</section>
};
let view: View<Dom> = s.try_into().unwrap();
assert_eq!(
String::from(view).as_str(),
"<section><div>hello</div> <div>hola</div> <div>kia ora</div></section>"
);
Hi
Is it possible to create a list of elements?
I've found no example, and none of the code I've looked at is using a Vec of items. I'd want to pre-create a list of items so that they are displayed at once, instead of sending them one by one.
Thank you for a great framework!