feat: upgrade syntax

This commit is contained in:
Jonathan Kelley committed 2021-11-10 17:09:52 -05:00
1 parent 574d7fdb9e
commit fd93ee89c1
64 files changed
+522 -437

No files matched your search

+4 -22
View File
@@ -215,12 +215,12 @@ fn create_components() {
})
};
#[derive(Props)]
struct ChildProps<'a> {
children: ScopeChildren<'a>,
#[derive(Props, PartialEq)]
struct ChildProps {
children: Element,
}
fn Child<'a>(cx: Context<'a>, props: &ChildProps<'a>) -> Element {
fn Child(cx: Context, props: &ChildProps) -> Element {
cx.render(rsx! {
h1 {}
div { {&props.children} }
@@ -299,21 +299,3 @@ fn anchors() {
]
);
}
#[test]
fn suspended() {
todo!()
// static App: FC<()> = |cx, props| {
// let val = use_suspense(cx, || async {}, |p| todo!());
// cx.render(rsx! { {val} })
// };
// let mut dom = new_dom(App, ());
// let mutations = dom.rebuild();
// assert_eq!(
// mutations.edits,
// [CreatePlaceholder { root: 0 }, AppendChildren { many: 1 },]
// );
}