finish router refrence
This commit is contained in:
1 parent
07446386e6
commit
b5a2f0d6cb
61 files changed
+676
-1908
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#![allow(non_snake_case, unused)]
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_router::prelude::*;
|
||||
|
||||
// ANCHOR: route
|
||||
#[derive(Routable, Clone)]
|
||||
#[rustfmt::skip]
|
||||
enum Route {
|
||||
// segments that start with :... are catch all segments
|
||||
#[route("/blog/:...segments")]
|
||||
BlogPost {
|
||||
// You must include catch all segment in child variants
|
||||
segments: Vec<String>,
|
||||
},
|
||||
}
|
||||
|
||||
// Components must contain the same catch all segments as their corresponding variant
|
||||
#[inline_props]
|
||||
fn BlogPost(cx: Scope, segments: Vec<String>) -> Element {
|
||||
todo!()
|
||||
}
|
||||
// ANCHOR_END: route
|
||||
|
||||
fn main() {}
|
||||
Reference in new issue
Block a user