Sha256: 93e4ab363ed2048af2ba977d7048dc22fd071e0b8a9570e600d8124a6be0ddbf

Contents?: true

Size: 396 Bytes

Versions: 4

Compression:

Stored size: 396 Bytes

Contents

const { render, hydrate, unmountComponentAtNode } = require('preact/compat');

function createRoot(container) {
	return {
		render(children) {
			render(children, container);
		},
		unmount() {
			unmountComponentAtNode(container);
		}
	};
}

exports.createRoot = createRoot;

exports.hydrateRoot = function(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.js
isomorfeus-preact-10.8.2 node_modules/preact/compat/client.js
isomorfeus-preact-10.8.1 node_modules/preact/compat/client.js
isomorfeus-preact-10.8.0 node_modules/preact/compat/client.js