Sha256: fb803ce8f23a5ce6847fa515924872a764a0c28e1fa5009da6cf8420b7b72ae0

Contents?: true

Size: 354 Bytes

Versions: 4

Compression:

Stored size: 354 Bytes

Contents

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)
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
isomorfeus-preact-10.9.0 node_modules/preact/compat/client.mjs
isomorfeus-preact-10.8.2 node_modules/preact/compat/client.mjs
isomorfeus-preact-10.8.1 node_modules/preact/compat/client.mjs
isomorfeus-preact-10.8.0 node_modules/preact/compat/client.mjs