mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
fix incremental router cache
This commit is contained in:
parent
d94316f7dd
commit
73a45fb113
2 changed files with 11 additions and 4 deletions
|
@ -12,9 +12,7 @@ where
|
|||
use dioxus_router::prelude::RouterConfig;
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
let context: crate::prelude::DioxusServerContext = cx
|
||||
.consume_context()
|
||||
.expect("RouteWithCfg should be served by dioxus fullstack");
|
||||
let context = crate::prelude::server_context();
|
||||
|
||||
let cfg = *cx.props;
|
||||
render! {
|
||||
|
|
|
@ -42,7 +42,16 @@ where
|
|||
if is_static {
|
||||
match Rt::from_str(&full_path) {
|
||||
Ok(route) => {
|
||||
render_route(renderer, route, &mut tokio::io::sink(), |_| {}, wrapper).await?;
|
||||
render_route(
|
||||
renderer,
|
||||
route,
|
||||
&mut tokio::io::sink(),
|
||||
|vdom| {
|
||||
let _ = vdom.rebuild();
|
||||
},
|
||||
wrapper,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
Err(e) => {
|
||||
log::info!("@ route: {}", full_path);
|
||||
|
|
Loading…
Reference in a new issue