Closed yisar closed 6 years ago
Moon used to use a virtual DOM. Now, it compiles views into direct JavaScript code — it is never "recompiled". Virtual DOM works by creating an abstraction over the normal DOM. When a change is made, Moon used to iterate through the new virtual DOM, compare it with the old virtual DOM, and use normal DOM operations to update the view.
With v1, instead of having to have the abstraction of the virtual DOM, Moon directly generates the normal DOM operations instead.
I've seen moonjs trigger data changes with
update
and recompileview
, Although it is accurate enough, but is it virtual DOM and diff not better?