main.rs 945 B

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