feat: enable children properly

This commit is contained in:
Jonathan Kelley committed 2021-12-21 00:46:10 -05:00
1 parent dbb981d500
commit b997b8ebbb
10 files changed
+128 -131

No files matched your search

+8 -9
View File
@@ -109,14 +109,14 @@ fn components_generate() {
*render_phase += 1;
cx.render(match *render_phase {
0 => rsx!("Text0"),
1 => rsx!(div {}),
2 => rsx!("Text2"),
3 => rsx!(Child {}),
4 => rsx!({ None as Option<()> }),
5 => rsx!("text 3"),
6 => rsx!({ (0..2).map(|f| rsx!("text {f}")) }),
7 => rsx!(Child {}),
1 => rsx!("Text0"),
2 => rsx!(div {}),
3 => rsx!("Text2"),
4 => rsx!(Child {}),
5 => rsx!({ None as Option<()> }),
6 => rsx!("text 3"),
7 => rsx!({ (0..2).map(|f| rsx!("text {f}")) }),
8 => rsx!(Child {}),
_ => todo!(),
})
};
@@ -220,7 +220,6 @@ fn components_generate() {
#[test]
fn component_swap() {
// simple_logger::init();
static App: Component<()> = |cx| {
let render_phase = cx.use_hook(|_| 0, |f| f);
*render_phase += 1;