frontend/.pnpm-store/v3/files/a5/2e6eb6aefebbd75d731cab69743ecb3394204c4169a97d0157e6f8115d9e904cdb3ba06ce732fc3d4f4357091d25a1355bdbac648254c2653434c983b1d9e1

23 lines
400 B
Plaintext

import { render, hydrate, unmountComponentAtNode } from 'preact/compat'
export function createRoot(container) {
return {
render(children) {
render(children, container)
},
unmount() {
unmountComponentAtNode(container)
}
}
}
export function hydrateRoot(container, children) {
hydrate(children, container)
return createRoot(container)
}
export default {
createRoot,
hydrateRoot
}