(vnode, parent, callback)
| 82 | * @returns {import('./internal').Component | null} The root component reference or null |
| 83 | */ |
| 84 | export function render(vnode, parent, callback) { |
| 85 | // React destroys any existing DOM nodes, see #1727 |
| 86 | // ...but only on the first render, see #1828 |
| 87 | if (parent._children == null) { |
| 88 | parent.textContent = ''; |
| 89 | } |
| 90 | |
| 91 | preactRender(vnode, parent); |
| 92 | if (typeof callback == 'function') callback(); |
| 93 | |
| 94 | return vnode ? vnode._component : null; |
| 95 | } |
| 96 | |
| 97 | export function hydrate(vnode, parent, callback) { |
| 98 | preactHydrate(vnode, parent); |
no outgoing calls
searching dependent graphs…