MCPcopy Create free account
hub / github.com/react/react / unmountComponent

Function unmountComponent

fixtures/dom/public/renderer.js:19–29  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

17 var needsCreateElement = getBooleanQueryParam('needsCreateElement');
18
19 function unmountComponent(node) {
20 // ReactDOM was moved into a separate package in 0.14
21 if (needsReactDOM) {
22 ReactDOM.unmountComponentAtNode(node);
23 } else if (React.unmountComponentAtNode) {
24 React.unmountComponentAtNode(node);
25 } else {
26 // Unmounting for React 0.4 and lower
27 React.unmountAndReleaseReactRootNode(node);
28 }
29 }
30
31 function createElement(value) {
32 // React.createElement replaced function invocation in 0.12

Callers 1

reloadFixtureFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected