O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The virtual DOM tree

Each cog instance has a virtual DOM tree associated with it. This virtual DOM tree is a parse tree comprised of all the children of the cog's div container.

Figure 9.2 is a flowchart depicting the process to render, and re-render (through the application of reconciliation) the cog to the DOM:

Figure 9.2: A flowchart depicting the process to render and re-render a cog

When the cog is first rendered in the DOM, a replace inner HTML operation is performed. The operation to replace the inner HTML contents of an element in the DOM is an expensive operation. Hence, it is not performed on subsequent renders of the cog.

All subsequent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required