#![recursion_limit = "256"] #[macro_use] mod helpers; use yew::html::ChildrenRenderer; #[derive(Properties, Default, PartialEq)] pub struct ChildProperties { pub string: String, #[props(required)] pub int: i32, pub vec: Vec, pub optional_callback: Option>, } pub struct Child; impl Component for Child { type Message = (); type Properties = ChildProperties; fn create(_: Self::Properties, _: ComponentLink) -> Self { Child } fn update(&mut self, _: Self::Message) -> ShouldRender { unimplemented!() } } impl Renderable for Child { fn view(&self) -> Html { unimplemented!() } } #[derive(Properties, Default)] pub struct ContainerProperties { #[props(required)] pub int: i32, pub children: Children, } pub struct Container; impl Component for Container { type Message = (); type Properties = ContainerProperties; fn create(_: Self::Properties, _: ComponentLink) -> Self { Container } fn update(&mut self, _: Self::Message) -> ShouldRender { unimplemented!() } } impl Renderable for Container { fn view(&self) -> Html { unimplemented!() } } #[derive(Properties, Default)] pub struct ChildContainerProperties { #[props(required)] pub int: i32, pub children: ChildrenWithProps, } pub struct ChildContainer; impl Component for ChildContainer { type Message = (); type Properties = ChildContainerProperties; fn create(_: Self::Properties, _: ComponentLink) -> Self { ChildContainer } fn update(&mut self, _: Self::Message) -> ShouldRender { unimplemented!() } } impl Renderable for ChildContainer { fn view(&self) -> Html { unimplemented!() } } mod scoped { pub use super::Child; pub use super::Container; } pass_helper! { html! { }; // backwards compat html! { }; html! { <> // backwards compat }; let props = ::Properties::default(); let props2 = ::Properties::default(); html! { <> // backwards compat }; html! { <> // backwards compat }; let name_expr = "child"; html! { }; html! { <> }; let props = ::Properties::default(); html! { <> <> ::std::vec::Vec<_> { vec![html!{ "String" }] } }()), ) /> }; html! { <> }; } fn main() {}