wip: remove portals completely

This commit is contained in:
Jonathan Kelley committed 2021-12-14 21:46:19 -05:00
1 parent 8daf7a6ed8
commit 2fd56e7619
17 files changed
+259 -404

No files matched your search

+2 -2
View File
@@ -13,12 +13,12 @@ mod test_logging;
fn shared_state_test() {
struct MySharedState(&'static str);
static App: Component<()> = |cx, props| {
static App: Component<()> = |cx| {
cx.provide_state(MySharedState("world!"));
cx.render(rsx!(Child {}))
};
static Child: Component<()> = |cx, props| {
static Child: Component<()> = |cx| {
let shared = cx.consume_state::<MySharedState>()?;
cx.render(rsx!("Hello, {shared.0}"))
};