-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HashRouter, basename and use gloo-history (#2239)
* Migrate to gloo-history. * Fix docs wording. * Add basename handling to navigator. * Fix basename handling. * Add lints and tests. * Fix wording. * Fix docs. * Fix pr-flow. * Fix some documentation. * Add Navigator Kind. * Remove history.rs * Add documentation for navigator & Concrete Router Props. * Update website/docs/concepts/router.md Co-authored-by: Julius Lungys <[email protected]> * Add docs about basename. * Update documentation. * Fix docs. Co-authored-by: Julius Lungys <[email protected]>
- Loading branch information
1 parent
5b0bbd5
commit d8ec501
Showing
23 changed files
with
770 additions
and
945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/yew-router-macro/tests/routable_derive/relative-path-fail.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#[derive(yew_router::Routable)] | ||
enum Routes { | ||
#[at("one")] | ||
One, | ||
} | ||
|
||
fn main() {} |
5 changes: 5 additions & 0 deletions
5
packages/yew-router-macro/tests/routable_derive/relative-path-fail.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: relative paths are not supported at this moment. | ||
--> tests/routable_derive/relative-path-fail.rs:3:10 | ||
| | ||
3 | #[at("one")] | ||
| ^^^^^ |
7 changes: 7 additions & 0 deletions
7
packages/yew-router-macro/tests/routable_derive/route-with-hash-fail.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#[derive(yew_router::Routable)] | ||
enum Routes { | ||
#[at("/#/one")] | ||
One, | ||
} | ||
|
||
fn main() {} |
5 changes: 5 additions & 0 deletions
5
packages/yew-router-macro/tests/routable_derive/route-with-hash-fail.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: You cannot use `#` in your routes. Please consider `HashRouter` instead. | ||
--> tests/routable_derive/route-with-hash-fail.rs:3:10 | ||
| | ||
3 | #[at("/#/one")] | ||
| ^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.