fix: Update dioxus-router docs

This commit is contained in:
marc2332 committed 2024-02-26 21:46:00 +01:00
1 parent 451a8f231e
commit d3b9b764e0
3 files changed
+6 -10

No files matched your search

@@ -8,10 +8,10 @@ use crate::prelude::*;
/// single component, but not recommended. Multiple subscriptions will be discarded.
///
/// # Return values
/// - [`None`], when the current component isn't a descendant of a [`Link`] component.
/// - [`None`], when the current component isn't a descendant of a [`Router`] component.
/// - Otherwise [`Some`].
pub(crate) fn use_router_internal() -> Option<RouterContext> {
let router = use_hook(consume_context::<RouterContext>);
let router = try_consume_context::<RouterContext>()?;
let id = current_scope_id().expect("use_router_internal called outside of a component");
use_drop({
to_owned![router];