create cfg factory
This commit is contained in:
1 parent
037a248ad9
commit
67992f7da9
6 files changed
+90
-72
No files matched your search
@@ -14,18 +14,7 @@ fn main() {
|
||||
|
||||
fn root(cx: Scope) -> Element {
|
||||
render! {
|
||||
Router {
|
||||
config: RouterConfiguration {
|
||||
history: {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
let history = Box::<MemoryHistory::<Route>>::default();
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
let history = Box::<WebHistory::<Route>>::default();
|
||||
history
|
||||
},
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
Router {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user