(container)
| 1 | const { render, hydrate, unmountComponentAtNode } = require('preact/compat'); |
| 2 | |
| 3 | 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 | exports.createRoot = createRoot; |
| 17 |
no test coverage detected
searching dependent graphs…