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
@@ -114,7 +114,7 @@ impl ServeConfigBuilder {
|
||||
}
|
||||
|
||||
/// Provide context to the root and server functions. You can use this context while rendering with [`consume_context`](dioxus_lib::prelude::consume_context)
|
||||
/// or in server functions with [`FromContext`](crate::prelude::FromContext).
|
||||
/// or in server functions with [`FromContext`](crate::FromContext).
|
||||
///
|
||||
///
|
||||
/// The context providers passed into this method will be called when the context type is requested which may happen many times in the lifecycle of the application.
|
||||
@@ -183,7 +183,7 @@ impl ServeConfigBuilder {
|
||||
}
|
||||
|
||||
/// Provide context to the root and server functions. You can use this context
|
||||
/// while rendering with [`consume_context`](dioxus_lib::prelude::consume_context) or in server functions with [`FromContext`](crate::prelude::FromContext).
|
||||
/// while rendering with [`consume_context`](dioxus_lib::prelude::consume_context) or in server functions with [`FromContext`](crate::FromContext).
|
||||
///
|
||||
///
|
||||
/// The context providers passed into this method will be called when the context type is requested which may happen many times in the lifecycle of the application.
|
||||
@@ -247,7 +247,7 @@ impl ServeConfigBuilder {
|
||||
}
|
||||
|
||||
/// Provide context to the root and server functions. You can use this context while rendering with [`consume_context`](dioxus_lib::prelude::consume_context)
|
||||
/// or in server functions with [`FromContext`](crate::prelude::FromContext).
|
||||
/// or in server functions with [`FromContext`](crate::FromContext).
|
||||
///
|
||||
/// Context will be forwarded from the LaunchBuilder if it is provided.
|
||||
///
|
||||
|
||||
@@ -126,7 +126,7 @@ mod server_fn_impl {
|
||||
}
|
||||
}
|
||||
|
||||
/// Clone a value from the shared server context. If you are using [`DioxusRouterExt`](crate::prelude::DioxusRouterExt), any values you insert into
|
||||
/// Clone a value from the shared server context. If you are using [`DioxusRouterExt`](crate::DioxusRouterExt), any values you insert into
|
||||
/// the launch context will also be available in the server context.
|
||||
///
|
||||
/// Example:
|
||||
|
||||
@@ -74,6 +74,7 @@ pub use context::{
|
||||
extract, server_context, with_server_context, DioxusServerContext, FromContext,
|
||||
FromServerContext, ProvideServerContext,
|
||||
};
|
||||
pub use dioxus_isrg::{IncrementalRenderer, IncrementalRendererConfig};
|
||||
pub use document::ServerDocument;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
@@ -81,18 +82,3 @@ mod launch;
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub use launch::{launch, launch_cfg};
|
||||
|
||||
/// Re-export commonly used items
|
||||
pub mod prelude {
|
||||
pub use crate::config::{ServeConfig, ServeConfigBuilder};
|
||||
pub use crate::context::Axum;
|
||||
pub use crate::context::{
|
||||
extract, server_context, with_server_context, DioxusServerContext, FromContext,
|
||||
FromServerContext, ProvideServerContext,
|
||||
};
|
||||
pub use crate::render::{FullstackHTMLTemplate, SSRState};
|
||||
pub use crate::server::*;
|
||||
pub use dioxus_isrg::{IncrementalRenderer, IncrementalRendererConfig};
|
||||
}
|
||||
|
||||
pub use dioxus_isrg::{IncrementalRenderer, IncrementalRendererConfig};
|
||||
@@ -6,12 +6,16 @@ use crate::{
|
||||
};
|
||||
use dioxus_cli_config::base_path;
|
||||
use dioxus_fullstack_hooks::history::FullstackHistory;
|
||||
use dioxus_fullstack_hooks::prelude::{StreamingContext, StreamingStatus};
|
||||
use dioxus_fullstack_hooks::{StreamingContext, StreamingStatus};
|
||||
use dioxus_fullstack_protocol::{HydrationContext, SerializedHydrationData};
|
||||
use dioxus_isrg::{CachedRender, IncrementalRendererError, RenderFreshness};
|
||||
use dioxus_lib::document::Document;
|
||||
use dioxus_lib::prelude::dioxus_core::DynamicNode;
|
||||
use dioxus_router::prelude::ParseRouteError;
|
||||
use dioxus_lib::{
|
||||
core::{
|
||||
has_context, provide_error_boundary, DynamicNode, ErrorContext, SuspenseContext, VirtualDom,
|
||||
},
|
||||
document::Document,
|
||||
};
|
||||
use dioxus_router::ParseRouteError;
|
||||
use dioxus_ssr::Renderer;
|
||||
use futures_channel::mpsc::Sender;
|
||||
use futures_util::{Stream, StreamExt};
|
||||
|
||||
Reference in new issue
Block a user