examples: upgrade to new version of dioxus core.

also add the inline_props macro
This commit is contained in:
Jonathan Kelley committed 2021-12-25 17:18:05 -05:00
1 parent 21e00c114e
commit cda759c659
41 files changed
+556 -253

No files matched your search

+3 -3
View File
@@ -58,15 +58,15 @@ static App: Component<()> = |cx| {
#[derive(Props)]
struct HorseyProps<'a> {
pos: i32,
children: ScopeChildren<'a>,
children: Element<'a>,
}
fn Horsey<'a>((cx, props): ScopeState<'a, HorseyProps<'a>>) -> Element {
fn Horsey<'a>(cx: Scope<'a, HorseyProps<'a>>) -> Element {
cx.render(rsx! {
div {
button { "pause" }
div {
{&props.children}
{&cx.props.children}
}
}
})