add a noop evaluator to the ssr renderer
This commit is contained in:
1 parent
c18f911429
commit
b9554fd744
6 files changed
+51
No files matched your search
@@ -24,6 +24,7 @@ fn app(cx: Scope<AppProps>) -> Element {
|
||||
|
||||
let mut count = use_state(cx, || 0);
|
||||
let text = use_state(cx, || "...".to_string());
|
||||
let eval = use_eval(cx);
|
||||
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
|
||||
@@ -45,6 +45,8 @@ impl SsrRendererPool {
|
||||
.expect("couldn't spawn runtime")
|
||||
.block_on(async move {
|
||||
let mut vdom = VirtualDom::new_with_props(component, props);
|
||||
// Make sure the evaluator is initialized
|
||||
dioxus_ssr::eval::init_eval(vdom.base_scope());
|
||||
let mut to = WriteBuffer { buffer: Vec::new() };
|
||||
// before polling the future, we need to set the context
|
||||
let prev_context =
|
||||
|
||||
Reference in new issue
Block a user