MCPcopy
hub / github.com/preactjs/preact / createRoot

Function createRoot

compat/client.js:3–14  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

1const { render, hydrate, unmountComponentAtNode } = require('preact/compat');
2
3function 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
16exports.createRoot = createRoot;
17

Callers 1

client.jsFile · 0.70

Calls 2

unmountComponentAtNodeFunction · 0.85
renderFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…