Fix hydration of link element (#4561)

* Fix hydration of link element

* revert some logging changes

* clean up fullstack history provider

* fix router tests

* fix document context type
This commit is contained in:
Evan Almloff authored and GitHub committed 2025-08-19 12:23:45 -07:00
1 parent 6cd4453662
commit 021565c171
12 files changed
+141 -109

No files matched your search

+6 -1
View File
@@ -64,7 +64,8 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
#[cfg(all(feature = "devtools", debug_assertions))]
let mut hotreload_rx = devtools::init();
let should_hydrate = web_config.hydrate;
// If the hydrate feature is enabled, launch the client with hydration enabled
let should_hydrate = web_config.hydrate || cfg!(feature = "hydrate");
let mut websys_dom = WebsysDom::new(web_config, runtime);
@@ -134,6 +135,10 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
virtual_dom.in_runtime(|| dioxus_core::ScopeId::APP.throw_error(error));
}
server_data.in_context(|| {
#[cfg(feature = "document")]
virtual_dom.in_runtime(|| {
document::init_fullstack_document();
});
virtual_dom.rebuild(&mut websys_dom);
});
websys_dom.skip_mutations = false;