Skip to content

Commit fc402b1

Browse files
committed
Optimize VList creation from ref ChildrenRenderer
1 parent 8242f53 commit fc402b1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/yew/src/html/conversion/into_prop_value.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ impl IntoPropValue<VNode> for ChildrenRenderer<VNode> {
170170
impl IntoPropValue<VNode> for &ChildrenRenderer<VNode> {
171171
#[inline]
172172
fn into_prop_value(self) -> VNode {
173-
VNode::VList(Rc::new(self.clone().into()))
173+
VNode::VList(Rc::new(VList::with_children(
174+
self.children.iter().cloned().collect(),
175+
None,
176+
)))
174177
}
175178
}
176179

0 commit comments

Comments
 (0)