it almost lives?
This commit is contained in:
1 parent
d637ef187c
commit
5f0dd3af3e
43 files changed
+506
-244
No files matched your search
@@ -1,12 +1,9 @@
|
||||
use dioxus::prelude::ScopeState;
|
||||
|
||||
use crate::{
|
||||
prelude::GenericRouterContext, routable::Routable,
|
||||
utils::use_router_internal::use_router_internal,
|
||||
};
|
||||
use crate::{prelude::RouterContext, utils::use_router_internal::use_router_internal};
|
||||
|
||||
/// A hook that provides access to information about the router.
|
||||
pub fn use_generic_router<R: Routable + Clone>(cx: &ScopeState) -> &GenericRouterContext<R> {
|
||||
pub fn use_router(cx: &ScopeState) -> &RouterContext {
|
||||
use_router_internal(cx)
|
||||
.as_ref()
|
||||
.expect("use_route must have access to a router")
|
||||
|
||||
Reference in new issue
Block a user