Hi, I already have an axum monolith backend serving a couple apps, (two react apps and a few APIs).
I built the next frontend in dioxus but currently the only way I've managed to get it to work is build a VirtualDom and SSR it like so:
// in an axum route handler
let rendered = tokio::task::block_in_place(|| {
let mut app = VirtualDom::new(build_app)
.with_root_context(doc)
.with_root_context(data);
app.rebuild_in_place();
dioxus::ssr::render(&app)
});
Ok(Html(rendered))
But this means I lose WASM-based reactivity and have to implement reactivity by inlining JS.
I think going dioxus-fullstack interests me the most but at this point getting dioxus-web would be a big upgrade. But I can't find any docs or examples where either of these are merged into an existing axum router. Ideally one which can take path and query parameters.
e.g. for dioxus-web the only two examples show
dioxus_web::launch::launch(app, vec![], Config::new().hydrate(true));
But it's not obvious how to make this impl axum::response::IntoResponse