fix can go back hydration (#4209)
This commit is contained in:
1 parent
a0ab159c01
commit
315854b449
10 files changed
+190
-8
No files matched your search
@@ -357,9 +357,6 @@ impl LaunchBuilder {
|
||||
.hydrate(true);
|
||||
|
||||
let mut vdom = dioxus_core::VirtualDom::new(app);
|
||||
for context in contexts {
|
||||
vdom.insert_any_root_context(context());
|
||||
}
|
||||
|
||||
#[cfg(feature = "document")]
|
||||
{
|
||||
@@ -369,6 +366,19 @@ impl LaunchBuilder {
|
||||
vdom.provide_root_context(document);
|
||||
}
|
||||
|
||||
#[cfg(feature = "document")]
|
||||
{
|
||||
use dioxus_fullstack::FullstackHistory;
|
||||
let history =
|
||||
std::rc::Rc::new(FullstackHistory::new(dioxus_web::WebHistory::default()))
|
||||
as std::rc::Rc<dyn crate::prelude::History>;
|
||||
vdom.provide_root_context(history);
|
||||
}
|
||||
|
||||
for context in contexts {
|
||||
vdom.insert_any_root_context(context());
|
||||
}
|
||||
|
||||
return dioxus_web::launch::launch_virtual_dom(vdom, platform_config);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user