history_buttons.rs 553 B

123456789101112131415161718192021222324252627282930
  1. #![allow(non_snake_case, unused)]
  2. use dioxus::prelude::*;
  3. use dioxus_router::prelude::*;
  4. #[derive(Routable, Clone)]
  5. #[rustfmt::skip]
  6. enum Route {
  7. #[route("/")]
  8. Home {},
  9. }
  10. #[inline_props]
  11. fn Home(cx: Scope) -> Element {
  12. todo!()
  13. }
  14. // ANCHOR: history_buttons
  15. fn HistoryNavigation(cx: Scope) -> Element {
  16. render! {
  17. GoBackButton {
  18. "Back to the Past"
  19. }
  20. GoForwardButton {
  21. "Back to the Future" /* You see what I did there? 😉 */
  22. }
  23. }
  24. }
  25. // ANCHOR_END: history_buttons
  26. fn main() {}