(container)
| 1 | import { render, hydrate, unmountComponentAtNode } from 'preact/compat'; |
| 2 | |
| 3 | export function createRoot(container) { |
| 4 | return { |
| 5 | // eslint-disable-next-line |
| 6 | render: function (children) { |
| 7 | render(children, container); |
| 8 | }, |
| 9 | // eslint-disable-next-line |
| 10 | unmount: function () { |
| 11 | unmountComponentAtNode(container); |
| 12 | } |
| 13 | }; |
| 14 | } |
| 15 | |
| 16 | export function hydrateRoot(container, children) { |
| 17 | hydrate(children, container); |
no test coverage detected
searching dependent graphs…