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:
1 parent
54d465a7b5
commit
4f1d039bad
140 files changed
+374
-477
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::prelude::{ExternalNavigationFailure, NavigationTarget, RouterContext};
|
||||
use crate::{ExternalNavigationFailure, NavigationTarget, RouterContext};
|
||||
|
||||
/// Acquire the navigator without subscribing to updates.
|
||||
///
|
||||
@@ -9,7 +9,7 @@ use crate::prelude::{ExternalNavigationFailure, NavigationTarget, RouterContext}
|
||||
/// Panics if there is no router present.
|
||||
pub fn navigator() -> Navigator {
|
||||
Navigator(
|
||||
dioxus_lib::prelude::try_consume_context::<RouterContext>()
|
||||
dioxus_lib::core::try_consume_context::<RouterContext>()
|
||||
.expect("A router must be present to use navigator"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use dioxus_lib::prelude::*;
|
||||
use dioxus_lib::core::{provide_context, try_consume_context, use_hook, Element, VNode};
|
||||
|
||||
use crate::{routable::Routable, utils::use_router_internal::use_router_internal};
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ use std::{
|
||||
};
|
||||
|
||||
use dioxus_history::history;
|
||||
use dioxus_lib::prelude::*;
|
||||
use dioxus_lib::{core::ReactiveContext, prelude::*};
|
||||
|
||||
use crate::{
|
||||
components::child_router::consume_child_route_mapping, navigation::NavigationTarget,
|
||||
prelude::SiteMapSegment, routable::Routable, router_cfg::RouterConfig,
|
||||
routable::Routable, router_cfg::RouterConfig, SiteMapSegment,
|
||||
};
|
||||
|
||||
/// An error that is thrown when the router fails to parse a route
|
||||
@@ -268,7 +268,7 @@ impl RouterContext {
|
||||
match route {
|
||||
Ok(route) => route,
|
||||
Err(err) => {
|
||||
throw_error(ParseRouteError { message: err });
|
||||
dioxus_core::throw_error(ParseRouteError { message: err });
|
||||
"/".parse().unwrap_or_else(|err| panic!("{err}"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user