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

Function mountLegacyApp

packages/react-devtools-shell/src/app/index.js:83–98  ·  view source on GitHub ↗
(App: () => React$Node)

Source from the content-addressed store, hash-verified

81}
82
83function mountLegacyApp(App: () => React$Node) {
84 // $FlowFixMe[prop-missing]: These are removed in 19.
85 const {render, unmountComponentAtNode} = require('react-dom');
86
87 function LegacyRender() {
88 return createElement(App);
89 }
90
91 const container = createContainer();
92
93 // $FlowFixMe[not-a-function]: These are removed in 19.
94 render(createElement(LegacyRender), container);
95
96 // $FlowFixMe: These are removed in 19.
97 unmountFunctions.push(() => unmountComponentAtNode(container));
98}
99
100const shouldRenderLegacy = semver.lte(
101 process.env.E2E_APP_REACT_VERSION,

Callers 1

mountTestAppFunction · 0.85

Calls 5

createElementFunction · 0.90
createContainerFunction · 0.70
pushMethod · 0.65
renderFunction · 0.50
unmountComponentAtNodeFunction · 0.50

Tested by

no test coverage detected