generic_component.rs 231 B

12345678910111213
  1. use dioxus::prelude::*;
  2. fn main() {
  3. dioxus_desktop::launch(app);
  4. }
  5. fn app(cx: Scope) -> Element {
  6. cx.render(rsx! { generic_child::<i32>{} })
  7. }
  8. fn generic_child<T>(cx: Scope) -> Element {
  9. cx.render(rsx! { div {} })
  10. }