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:
1 parent
cf1940cdac
commit
01ebccc269
8 files changed
+79
-15
No files matched your search
@@ -1,5 +1,4 @@
|
||||
use crate::innerlude::ScopeOrder;
|
||||
use crate::Runtime;
|
||||
use std::borrow::Borrow;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::VecDeque;
|
||||
@@ -29,13 +28,11 @@ impl Effect {
|
||||
self.effect.borrow_mut().push_back(Box::new(f));
|
||||
}
|
||||
|
||||
pub(crate) fn run(&self, runtime: &Runtime) {
|
||||
runtime.rendering.set(false);
|
||||
pub(crate) fn run(&self) {
|
||||
let mut effect = self.effect.borrow_mut();
|
||||
while let Some(f) = effect.pop_front() {
|
||||
f();
|
||||
}
|
||||
runtime.rendering.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user