Merge pull request #392 from trusktr/patch-1

make it obvious how to unmount
pull/443/head
Simon Friis Vindum 6 years ago committed by GitHub
commit 8787d60221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -92,6 +92,9 @@ var newVnode = h('div#container.two.classes', {on: {click: anotherEventHandler}}
]);
// Second `patch` invocation
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)
```
## Examples
@ -176,7 +179,6 @@ var newVNode = h('div', {style: {color: '#000'}}, [
]);
patch(toVNode(document.querySelector('.container')), newVNode)
```
### Hooks

Loading…
Cancel
Save