wip: remove cx.children. start to move towards a "children" field
This commit is contained in:
1 parent
6b2645fd80
commit
7b97e009ec
14 files changed
+114
-276
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user