wip: more work on updating syntad

This commit is contained in:
Jonathan Kelley committed 2021-06-15 10:02:46 -04:00
1 parent e45b6e0aa2
commit 47e896038e
27 files changed
+376 -142

No files matched your search

+5 -2
View File
@@ -8,14 +8,17 @@ fn main() {
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(App));
}
// Use `wee_alloc` as the global allocator.
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
fn App(ctx: Context<()>) -> VNode {
let cansee = use_state_new(&ctx, || false);
rsx! { in ctx,
div {
"Shadow of the child:"
button {
button { onclick: move |_| cansee.set(!**cansee)
"Gaze into the void"
onclick: move |_| cansee.set(!**cansee)
}
{cansee.then(|| rsx!{ Child {} })}
}