wip: more examples

This commit is contained in:
Jonathan Kelley committed 2021-07-11 19:31:07 -04:00
1 parent 304259d818
commit 56e7eb83a9
21 files changed
+162 -236

No files matched your search

+4 -1
View File
@@ -44,6 +44,7 @@ pub fn fc_to_builder<T: Properties>(_: FC<T>) -> T::Builder {
T::builder()
}
use crate::nodebuilder::LazyNodes;
/// Create inline fragments
///
/// Fragments capture a series of children without rendering extra nodes.
@@ -53,5 +54,7 @@ pub fn fc_to_builder<T: Properties>(_: FC<T>) -> T::Builder {
use crate::prelude::*;
#[allow(non_upper_case_globals, non_snake_case)]
pub fn Fragment<'a>(cx: Context<'a, ()>) -> VNode<'a> {
cx.render(LazyNodes::new(move |f| f.fragment_from_iter(cx.children())))
cx.render(LazyNodes::new(move |f| {
f.fragment_from_iter(cx.children())
}))
}