Feat: view -> render

This commit is contained in:
Jonathan Kelley committed 2021-02-28 21:21:17 -05:00
1 parent 10a236fc65
commit c8bb392cad
24 files changed
+204 -48

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@ struct Props {
static Example: FC<Props> = |ctx, props| {
let value = ctx.use_context(|c: &SomeContext| c.items.last().unwrap());
ctx.view(move |bump| {
ctx.render(move |bump| {
button(bump)
.on("click", move |_| {
println!("Value is {}", props.name);
@@ -26,7 +26,7 @@ static Example: FC<Props> = |ctx, props| {
})
.finish()
})
// ctx.view(html! {
// ctx.render(html! {
// <div>
// <button onclick={move |_| println!("Value is {}", value)} />
// <button onclick={move |_| println!("Value is {}", value)} />