clean up prelude (#4416)

* clear away prelude on dioxus

* clippy

* wip - drop prelude from dioxus-html

* docs clippy

* wip

* more fixe

* delete all preludes

* doc...

* better export

* merge some imports

* fewer global imports

* global incremental renderer

* fix cargo doc
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-07-16 16:04:13 -07:00
1 parent 54d465a7b5
commit 4f1d039bad
140 files changed
+374 -477

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
use dioxus_lib::prelude::{try_consume_context, use_hook};
use dioxus_lib::core::{try_consume_context, use_hook};
use crate::prelude::{Navigator, RouterContext};
use crate::{Navigator, RouterContext};
/// A hook that provides access to the navigator to change the router history.
///
+2 -3
View File
@@ -1,17 +1,16 @@
use crate::prelude::*;
use crate::utils::use_router_internal::use_router_internal;
use crate::Routable;
/// A hook that provides access to information about the current routing location.
///
/// > The Routable macro will define a version of this hook with an explicit type.
///
/// # Panic
/// - When the calling component is not nested within a [`Router`] component.
/// - When the calling component is not nested within a [`crate::Router`] component.
///
/// # Example
/// ```rust
/// # use dioxus::prelude::*;
/// # use dioxus_router::{prelude::*};
///
/// #[derive(Clone, Routable)]
/// enum Route {
+3 -3
View File
@@ -1,4 +1,4 @@
use crate::{prelude::RouterContext, utils::use_router_internal::use_router_internal};
use crate::{utils::use_router_internal::use_router_internal, RouterContext};
#[deprecated = "prefer the `router()` function or `use_route` functions"]
#[must_use]
@@ -10,11 +10,11 @@ pub fn use_router() -> RouterContext {
/// Acquire the router without subscribing to updates.
#[doc(alias = "url")]
pub fn router() -> RouterContext {
dioxus_lib::prelude::consume_context()
dioxus_lib::core::consume_context()
}
/// Try to acquire the router without subscribing to updates.
#[doc(alias = "url")]
pub fn try_router() -> Option<RouterContext> {
dioxus_lib::prelude::try_consume_context()
dioxus_lib::core::try_consume_context()
}