Does mithril.js use DOM-diffing when you use m.render?

139 views Asked by At

In my previous Q/A, I found that you don't use m.redraw with m.render, which makes sense, but:

  • Does this mean that mithril maintains no relationship between rendered virtual nodes and the DOM-node they are inserted into (when using m.render)?

  • Or does mithril still keep track of what is/was mounted at which node (when using m.render), allowing it to diff the virtual DOM and keep up the performance?

In the former case, m.mount might actually be faster than m.render.

1

There are 1 answers

0
Tivac On BEST ANSWER

Mithril will still track what has been mounted to DOM nodes, and it will do vdom diffing for multiple calls to m.render().

Docs on this feature