You are currently viewing the docs for Dioxus 0.5.7 which is no longer maintained.

History Providers

[ HistoryProvider]

The router provides two HistoryProvider]

  • The MemoryHistory]
  • The LiveviewHistory]
  • The WebHistory]

By default, the router uses the MemoryHistory]WebHistory]web feature is active, but that is not guaranteed.

You can override the default history:

src/history_provider.rs
#[component]
fn App() -> Element {
    rsx! {Router::<Route> { config: || RouterConfig::default().history(WebHistory::default()) }}
}