1
0

input_uncontrolled.rs 484 B

12345678910111213141516171819202122
  1. #![allow(non_snake_case)]
  2. use dioxus::prelude::*;
  3. fn main() {
  4. dioxus::desktop::launch(App);
  5. }
  6. // ANCHOR: component
  7. fn App(cx: Scope) -> Element {
  8. cx.render(rsx! {
  9. form {
  10. onsubmit: move |event| {
  11. println!("Submitted! {event:?}")
  12. },
  13. input { name: "name", },
  14. input { name: "age", },
  15. input { name: "date", },
  16. input { r#type: "submit", },
  17. }
  18. })
  19. }
  20. // ANCHOR_END: component