codify "platform" into resolution logic, server-fn/fullstack overhaul (#4596)
overhaul dioxus fullstack using a new implementation of server_fn This PR is a complete rewrite of dioxus fullstack designed to improve compatibility with axum and to fix a number of compilation errors based on feature flag unification plumbing through macros.
This commit is contained in:
1 parent
8421c3aef0
commit
f2b1c6d97f
424 files changed
+17284
-6624
No files matched your search
@@ -4,8 +4,6 @@
|
||||
|
||||
//! # Dioxus Web
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
pub use crate::cfg::Config;
|
||||
use crate::hydration::SuspenseMessage;
|
||||
use dioxus_core::VirtualDom;
|
||||
@@ -22,17 +20,16 @@ pub use events::*;
|
||||
|
||||
#[cfg(feature = "document")]
|
||||
mod document;
|
||||
#[cfg(feature = "file_engine")]
|
||||
mod file_engine;
|
||||
#[cfg(feature = "document")]
|
||||
mod history;
|
||||
#[cfg(feature = "document")]
|
||||
pub use document::WebDocument;
|
||||
#[cfg(feature = "file_engine")]
|
||||
pub use file_engine::*;
|
||||
#[cfg(feature = "document")]
|
||||
pub use history::{HashHistory, WebHistory};
|
||||
|
||||
mod files;
|
||||
pub use files::*;
|
||||
|
||||
#[cfg(all(feature = "devtools", debug_assertions))]
|
||||
mod devtools;
|
||||
|
||||
@@ -95,7 +92,7 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
|
||||
|
||||
#[cfg(feature = "hydrate")]
|
||||
{
|
||||
use dioxus_fullstack_protocol::HydrationContext;
|
||||
use dioxus_fullstack_core::HydrationContext;
|
||||
|
||||
websys_dom.skip_mutations = true;
|
||||
// Get the initial hydration data from the client
|
||||
@@ -139,7 +136,7 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
|
||||
// Provide a hydration compatible create error boundary method
|
||||
dioxus_core::ScopeId::ROOT.in_runtime(|| {
|
||||
dioxus_core::provide_create_error_boundary(
|
||||
dioxus_fullstack_hooks::errors::init_error_boundary,
|
||||
dioxus_fullstack_core::init_error_boundary,
|
||||
);
|
||||
});
|
||||
#[cfg(feature = "document")]
|
||||
@@ -235,7 +232,7 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
|
||||
"Hot-patch success!",
|
||||
&format!("App successfully patched in {} ms", hr_msg.ms_elapsed),
|
||||
devtools::ToastLevel::Success,
|
||||
Duration::from_millis(2000),
|
||||
std::time::Duration::from_millis(2000),
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user