Make deprecated use router (#1260)
* make router props expansion better * fix router data fields * make a deprecated use_router hook
This commit is contained in:
1 parent
5e3451a6f2
commit
cfd62e274e
12 files changed
+82
-149
No files matched your search
@@ -35,17 +35,13 @@ impl Navigator {
|
||||
///
|
||||
/// The previous location will be available to go back to.
|
||||
pub fn push(&self, target: impl Into<IntoRoutable>) -> Option<ExternalNavigationFailure> {
|
||||
let target = target.into();
|
||||
let as_any_navigation_target = self.0.resolve_into_routable(&target);
|
||||
self.0.push_any(as_any_navigation_target)
|
||||
self.0.push(target)
|
||||
}
|
||||
|
||||
/// Replace the current location.
|
||||
///
|
||||
/// The previous location will **not** be available to go back to.
|
||||
pub fn replace(&self, target: impl Into<IntoRoutable>) -> Option<ExternalNavigationFailure> {
|
||||
let target = target.into();
|
||||
let as_any_navigation_target = self.0.resolve_into_routable(&target);
|
||||
self.0.replace_any(as_any_navigation_target)
|
||||
self.0.replace(target)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user