Kostas Siabanis Kostas Siabanis -3 years ago 219
React JSX Question

Is zone.js for Angular, what is the virtual DOM for React?

Pascal Precht wrote a great article on change detection in Angular. While I understand that zone.js and virtual DOM are completely different concepts, is zone.js for Angular the equivalent of virtual DOM for React? If yes, what are the main differences, if no please briefly explain why.

Answer Source

zone.js It basically monkey patches almost all async/events, and run change detection once those events executed. Eventually it helps to binding in sync on HTML.

Whereas Virtual DOM is completely different, it is used by react to render DOM on DOM tree with optimized way. Internally react uses DOM Diffing algorithm to make it faster by having multiple copies of DOM.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download