set(viewNew) {
		// When given a new view, patch the old element to match the new node using
		// the old node as reference.
		if (viewOld.name === viewNew.name) {
			// If the root views have the same name, patch their data.
			viewPatch(viewOld, viewOldElement, viewNew);
		} else {
			// If they have different names, create a new old view element.
			const viewOldElementNew = viewCreate(viewNew);

			// Manipulate the DOM to replace the old view.
			viewOldElement.parentNode.replaceChild(viewOldElementNew, viewOldElement);

			// Update the reference to the old view element.
			viewOldElementUpdate(viewOldElementNew);
		}

		// Store the new view as the old view to be used as reference during a
		// patch.
		viewOldUpdate(viewNew);
	}
The view transformer renderer is responsible for updating the DOM and
rendering views. The patch consists of walking the new tree and finding
differences between the trees. The old tree is used to compare values for
performance. The DOM is updated to reflect these changes as well. Ideally,
the DOM would provide an API for creating lightweight elements and render
directly from a virtual DOM, but Moon uses the imperative API for updating
it instead.

Since views can easily be cached, Moon skips over patches if the old and new
nodes are equal. This is also why views should be pure and immutable. They
are created every render and stored, so if they are ever mutated, Moon will
skip them anyway because they have the same reference. It can use a little
more memory, but Moon nodes are heavily optimized to work well with
JavaScript engines, and immutability opens up the opportunity to use
standard functional techniques for caching.

@param {object} viewNew