Assume the virtual dom is not rendering while not diffing components (#3406)

* Invert when the rendering flag is set

* Add a playwright test to make sure effects, and web-sys integration is working

* fix playwright test
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-12-20 12:08:57 -08:00
1 parent cf1940cdac
commit 01ebccc269
8 files changed
+79 -15

No files matched your search

-2
View File
@@ -275,7 +275,6 @@ impl Runtime {
// poll the future with the scope on the stack
let poll_result = self.with_scope_on_stack(task.scope, || {
self.rendering.set(false);
self.current_task.set(Some(id));
let poll_result = task.task.borrow_mut().as_mut().poll(&mut cx);
@@ -293,7 +292,6 @@ impl Runtime {
poll_result
});
self.rendering.set(true);
self.current_task.set(None);
poll_result