feat: keyed diffing!!
This commit is contained in:
1 parent
0a0be95c3e
commit
d717c22d9c
6 files changed
+494
-236
No files matched your search
@@ -171,10 +171,11 @@ impl VirtualDom {
|
||||
/// This method uses the `DebugDom` under the hood - essentially making the VirtualDOM's diffing patches a "no-op".
|
||||
///
|
||||
/// SSR takes advantage of this by using Dioxus itself as the source of truth, and rendering from the tree directly.
|
||||
pub fn rebuild_in_place(&mut self) -> Result<()> {
|
||||
pub fn rebuild_in_place(&mut self) -> Result<Vec<DomEdit>> {
|
||||
let mut realdom = DebugDom::new();
|
||||
let mut edits = Vec::new();
|
||||
self.rebuild(&mut realdom, &mut edits)
|
||||
self.rebuild(&mut realdom, &mut edits)?;
|
||||
Ok(edits)
|
||||
}
|
||||
|
||||
/// Performs a *full* rebuild of the virtual dom, returning every edit required to generate the actual dom rom scratch
|
||||
|
||||
Reference in new issue
Block a user