main.rs 975 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. use dioxus_core::prelude::*;
  2. use dioxus_web::WebsysRenderer;
  3. mod filtertoggles;
  4. mod recoil;
  5. mod state;
  6. mod todoitem;
  7. mod todolist;
  8. use todolist::TodoList;
  9. static APP_STYLE: &'static str = include_str!("./style.css");
  10. fn main() {
  11. wasm_bindgen_futures::spawn_local(WebsysRenderer::start(|ctx, _| {
  12. ctx.render(rsx! {
  13. div {
  14. id: "app"
  15. style { "{APP_STYLE}" }
  16. // list
  17. TodoList {}
  18. // footer
  19. footer {
  20. class: "info"
  21. p {"Double-click to edit a todo"}
  22. p {
  23. "Created by "
  24. a { "jkelleyrtp", href: "http://github.com/jkelleyrtp/" }
  25. }
  26. p {
  27. "Part of "
  28. a { "TodoMVC", href: "http://todomvc.com" }
  29. }
  30. }
  31. }
  32. })
  33. }))
  34. }