fix: login example to use proper methods
This commit is contained in:
1 parent
c6bdb5db76
commit
babe862739
2 files changed
+12
-13
No files matched your search
@@ -106,7 +106,7 @@ impl Drop for UseRouteListener {
|
||||
}
|
||||
|
||||
/// This hook provides access to the `RouterService` for the app.
|
||||
pub fn use_router(cx: &ScopeState) -> &RouterService {
|
||||
pub fn use_router(cx: &ScopeState) -> &Rc<RouterService> {
|
||||
cx.use_hook(|_| {
|
||||
cx.consume_context::<RouterService>()
|
||||
.expect("Cannot call use_route outside the scope of a Router component")
|
||||
|
||||
Reference in new issue
Block a user