it almost lives?

This commit is contained in:
Evan Almloff committed 2023-07-25 18:14:48 -07:00
1 parent d637ef187c
commit 5f0dd3af3e
43 files changed
+506 -244

No files matched your search

+2 -5
View File
@@ -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")