1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! # Native Router
//!
//! Even though Freya supports Dioxus Router, there are certain integrations that it does not provide, such as as back and forward navigation with the mouse buttons.
//! For things like this exists `NativeRouter`, a thin wrapper component that adds these missing integrations.
//!
//! You simply need to wrap your `Router` content inside the `NativeRouter` component.
//!
//! Example (based on the example from [router](crate::_docs::router)):
//! ```rust, ignore
//! #[allow(non_snake_case)]
//! fn AppSidebar() -> Element {
//!     rsx!(
//!         NativeRouter {
//!             Body {
//!                 Link {
//!                     to: Route::Home,
//!                     label {
//!                         "Home"
//!                     }
//!                 },
//!                 Link {
//!                     to: Route::Other,
//!                     label {
//!                         "Other"
//!                     }
//!                 },
//!                 // Rest of app
//!             }
//!         }
//!     )
//! }
//! ```