wip: remove portals completely
This commit is contained in:
1 parent
8daf7a6ed8
commit
2fd56e7619
17 files changed
+259
-404
No files matched your search
@@ -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}"))
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user