patch(vnode, newVnode); // Snabbdom efficiently updates the old view to the new state
// to unmount from the DOM and clean up, simply pass null
patch(newVnode, null)
```
## More examples
@ -102,6 +99,7 @@ patch(newVnode, null)
* [Core documentation](#core-documentation)
* [`snabbdom.init`](#snabbdominit)
* [`patch`](#patch)
* [Unmounting](#unmounting)
* [`snabbdom/h`](#snabbdomh)
* [`snabbdom/tovnode`](#snabbdomtovnode)
* [Hooks](#hooks)
@ -179,6 +177,16 @@ vnode tree.
patch(oldVnode, newVnode);
```
#### Unmounting
While there is no API specifically for removing a VNode tree from its mount point element, one way of almost achieving this is providing a comment VNode as the second argument to `patch`, such as: