Closed fr-an-k closed 5 months ago
I solved it by using a manual root virtual dom:
let vdom = VirtualDom::new_with_props(App, AppProps { name: id.into() });
dioxus_web::launch::launch_virtual_dom(vdom, cfg);
Dynamic rendering works properly. Might want to improve the API/documentation, otherwise this can be closed.
Instead of using root props, you can provide root context with the launch builder
Problem
I can't figure out from the docs or examples (or the repo) how to pass props to the root component when launching.
Some outdated documentation (https://dioxuslabs.com/docs/nightly/guide/en/fullstack/server_functions.html) mentions dioxus_web::launch_with_props, but this function doesn't exist (anymore).
The ecommerce example uses this function on the liveview platform.
I also tried to make a closure-based component but that doesn't seem to be possible due to the lack of dyn in the component fn parameter type.
Steps To Reproduce Something like this:
Add dioxus_web as a dependency.
Build:
Environment:
Questionnaire