Remove deprecated React.unmountAndReleaseReactRootNode
Paul O'Shannessy committed
Dec 2, 2013 at 17:21 UTC
1b8bdbe177f2f03c66e9288149316695fc004b41
3 files changed
-36
src/core/React.js
-1
@@ -51,7 +51,6 @@ var React = {
51
),
52
renderComponentToString: ReactServerRendering.renderComponentToString,
53
unmountComponentAtNode: ReactMount.unmountComponentAtNode,
54
- unmountAndReleaseReactRootNode: ReactMount.unmountAndReleaseReactRootNode,
54
isValidClass: ReactCompositeComponent.isValidClass,
55
isValidComponent: ReactComponent.isValidComponent,
56
withContext: ReactContext.withContext,
src/core/ReactMount.js
-14
@@ -408,20 +408,6 @@ var ReactMount = {
408
return true;
409
},
410
411
- /**
412
- * @deprecated
413
- */
414
- unmountAndReleaseReactRootNode: function() {
415
- if (__DEV__) {
416
- console.warn(
417
- 'unmountAndReleaseReactRootNode() has been renamed to ' +
418
- 'unmountComponentAtNode() and will be removed in the next ' +
419
- 'version of React.'
420
- );
421
- }
422
- return ReactMount.unmountComponentAtNode.apply(this, arguments);
423
- },
424
-
411
/**
412
* Unmounts a component and removes it from the DOM.
413
*
src/core/__tests__/ReactMount-test.js
-21
@@ -35,25 +35,4 @@ describe('ReactMount', function() {
35
ReactMount.renderComponent(<span></span>, container);
36
expect(container.firstChild.nodeName).toBe('SPAN');
37
});
38
-
39
- it('should warn on unmountAndReleaseReactRootNode', function() {
40
- var _warn = console.warn;
41
- console.warn = mocks.getMockFunction();
42
-
43
- var container = document.createElement('container');
44
- ReactMount.renderComponent(<span />, container);
45
- expect(console.warn.mock.calls.length).toBe(0);
46
-
47
- // This method should warn, nothing else should.
48
- ReactMount.unmountAndReleaseReactRootNode(container);
49
- expect(console.warn.mock.calls.length).toBe(1);
50
-
51
- ReactMount.renderComponent(<span />, container);
52
- expect(console.warn.mock.calls.length).toBe(1);
53
-
54
- ReactMount.unmountComponentAtNode(container);
55
- expect(console.warn.mock.calls.length).toBe(1);
56
-
57
- console.warn = _warn;
58
- });
38
});