MCPcopy
hub / github.com/facebook/react / createLegacyRoot

Function createLegacyRoot

fixtures/nesting/src/legacy/createLegacyRoot.js:29–43  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

27}
28
29export default function createLegacyRoot(container) {
30 return {
31 render(Component, props, context) {
32 ReactDOM.render(
33 <Bridge context={context}>
34 <Component {...props} />
35 </Bridge>,
36 container
37 );
38 },
39 unmount() {
40 ReactDOM.unmountComponentAtNode(container);
41 },
42 };
43}

Callers 1

lazyLegacyRoot.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected