feat: mvoe away from compound context

This commit is contained in:
Jonathan Kelley committed 2021-09-21 13:42:52 -04:00
1 parent bfdcb20437
commit a2c7d17b05
103 files changed
+309 -293

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
```rust
fn Example(cx: &mut Context<()>) -> DomTree {
fn Example<'a>(cx: Context<'a>, props: &()) -> DomTree<'a> {
let service = use_combubulator(cx);
let Status { name, pending, count } = service.info();
html! {
@@ -7,7 +7,7 @@ fn Example(cx: &mut Context<()>) -> DomTree {
<p> "Hello, {name}!" </p>
<p> "Status: {pending}!" </p>
<p> "Count {count}!" </p>
<button onclick=|_| service.update()>
<button onclick={|_| service.update()}>
"Refresh services"
</button>
</div>