wip: remove cx.children. start to move towards a "children" field

This commit is contained in:
Jonathan Kelley committed 2021-11-01 02:22:08 -04:00
1 parent 6b2645fd80
commit 7b97e009ec
14 files changed
+114 -276

No files matched your search

+2 -2
View File
@@ -15,12 +15,12 @@ fn shared_state_test() {
static App: FC<()> = |(cx, props)| {
cx.provide_state(MySharedState("world!"));
rsx!(Child {})
cx.render(rsx!(Child {}))
};
static Child: FC<()> = |(cx, props)| {
let shared = cx.consume_state::<MySharedState>()?;
rsx!("Hello, {shared.0}")
cx.render(rsx!("Hello, {shared.0}"))
};
let mut dom = VirtualDom::new(App);